[英]Error parsing XML: not well-formed (invalid token) and all R's in red
<?xml version="1.0" encoding="utf-8"?>
<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:="@+id/question_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="24dp"
android:id="@+id/textView" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<Button
android:id="@+id/true_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/true_button" />
<Button
android:id="@+id/false_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/false_button" />
</LinearLayout>
<Button
android:id="@+id/next_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/next_button" />
</LinearLayout>
And in the java main class it appears all the "R" in red and they say "cannot resolve symbol 'R'", all the tags are closed in the xml so i really don't know what is causing the problem. 在java主类中,它显示为红色的所有“R”,并且它们说“无法解析符号'R'”,所有标签都在xml中关闭,所以我真的不知道导致问题的原因。
First attribute in TextView node must have a name, now it has only namespaсe android TextView节点中的第一个属性必须有一个名称,现在它只有一个名称为android
See attentively at string: 仔细看看字符串:
android:="@+id/question_text_view"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.