我是新来的Android编程,我不明白我在做什么错。 我尽量让这样的按钮,在XML文件:Android的呈现问题未能解决资源@字符串/ APP_NAME
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/btnText"
android:id="@+id/button"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true" />
也能正常工作,而机器人:文本=“@字符串/ btnText”的一部分......
我的strings.xml文件看起来是这样的:
<string name="btnText">GO!</string>
我收到此错误信息: 呈现问题未能解决资源@字符串/ APP_NAME(2个类似的错误,未显示)
问题是按钮文本说@字符串/ btnText而不是GO!
1.清洁并生成项目。 2.检查,如果你已经使用了字符串出现在strings.xml中 – TheLostMind
清理并生成没有在所有的工作。正如你所看到的,我已经在strings.xml文件中调用了他的字符串标记。 – CoderOgden
你的strings.xml应该包含app_name。它在吗? – TheLostMind