所以我现在面临的主要问题是Android Studio无法识别我在项目的Strings.xml文件中创建的一些字符串资源。更具体地说,在“设计”选项卡中。
As you can see here, the (highlighted) string is there.
我尝试删除TextView并将其替换为新版本,但遗憾的是没有运气。
是的,我知道我的字符串命名远非最佳。
答案 0 :(得分:0)
在您的XML文件中,添加所需的字符串
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/inspireTxt"
android:text="@string/inspirational" />
设计师不会总是得到更新。但是,如果你像这样用XML编码,它就会起作用。 其次,如果您仍想使用Designer,请尝试清理和重建项目。 有时新添加的值不会被索引。
希望这有帮助。