"无法解析的资源和QUOT;在机器人工作室的preVIEW [英] "Couldn't resolve resource" in Android Studio's Preview
问题描述
在的strings.xml
添加新项目后,往往他们不开始在Android的Studio的preVIEW立即工作。
After adding new items in strings.xml
, quite often they don't start working immediately in Android Studio's Preview.
Couldn't resolve resource @string/faq_customer_service
preVIEW看起来是这样的:
Preview looks like this:
我显然试图重新生成项目,甚至执行摇篮干净assembleDebug
,但它似乎并没有帮助。在仿真器和放大器;实际设备新添加字符串资源做的工作。
I've obviously tried to re-build the project, and even run gradle clean assembleDebug
, but it doesn't seem to help. On emulator & real device the newly-added string resources do work.
任何伎俩,迫使Android的工作室来重新加载资源,使正确的文本显示在preVIEW?
Any trick to force Android Studio to reload the resources so that the correct texts show up in Preview?
推荐答案
我到目前为止发现的唯一可靠的办法就是重装项目/重启Android的工作室。
The only reliable way I've found so far is reloading the project / restarting Android Studio.
最快做到这一点的方法是文件和RARR;无效缓存/重新启动...→只需重新启动
Quickest way to do that is File → Invalidate caches / Restart... → Just Restart.
随意张贴更好的解决方案!
Feel free to post better solutions!
这篇关于"无法解析的资源和QUOT;在机器人工作室的preVIEW的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!