错误解析XML:没有很好地形成(标记无效)和所有的R的红色
问题描述:
<?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>
,并在其中出现Java主类所有的“R”为红色,他们说:“不能解析符号‘R’”,所有的标签都在xml中关闭,所以我真的不知道是什么导致了问题。在TextView的节点错误解析XML:没有很好地形成(标记无效)和所有的R的红色
答
第一个属性必须有一个名字,现在它只有namespaсe安卓
在字符串见用心:
android:="@+id/question_text_view"
+0
该行无效,请将其删除 –
尝试清理和重建项目。 – Drv
还要确保'