刚开始编程的机器人,我试图做一个简单的xml
文件,但似乎有一些问题与android:[email protected]/..
没有资源发现
我有这个错误:
error: Error: No resource found that matches the given name (at 'text' with value '@string/ false_button').
对于每个弦的..
的代码是:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width = "match_parent" android:layout_height="match_parent" android:gravity="center" android:orientation="vertical" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding= "24dp" android:text="@string/question_text"/> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" > <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/true_button"/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/false_button"/> </LinearLayout> </LinearLayout>
你有没有宣布false_button在string.xml – InnocentKiller
现在只是尝试使用普通的字符串,而不是'@字符串/ false_button',看看是否可行。使用:'android:text =“False”/>' –