简体   繁体   English

解析XML时出错:格式不正确(令牌无效),所有R都是红色

[英]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.

相关问题 错误:解析XML时出错:格式不正确(令牌无效)? - error: Error parsing XML: not well-formed (invalid token)? 错误:(41)解析XML时出错:格式不正确(无效的令牌)+无法解析符号R - Error:(41) Error parsing XML: not well-formed (invalid token) + cannot resolve the symbol R XML文件错误-Android(解析XML错误:格式不正确(令牌无效)) - Error with XML file - Android(Error parsing XML: not well-formed (invalid token)) 解析XML时出错:格式不正确(无效的令牌),而XML恰好很好 - Error parsing XML: not well-formed (invalid token) while XML is just perfectly fine 此处不允许使用属性 android 并显示此消息“Error:(42) Error parsing XML: not well-formed (invalid token)” - Attribute android is not allowed here and show this message “Error:(42) Error parsing XML: not well-formed (invalid token)” 错误:(45)解析XML错误:格式不正确(无效的令牌),因为按钮“ &lt;&lt;” - Error:(45) Error parsing XML: not well-formed (invalid token) Because Button “<<” android studio不断显示“错误解析XML:格式错误(无效的令牌)”消息 - android studio keeps giving me message “Error parsing XML: not well-formed (invalid token)” 在eclipse中创建应用程序:解析XML错误:格式不正确(无效令牌) - creating an app in eclipse: Error parsing XML: not well-formed (invalid token) 解析XML时出错:制作应用时格式不正确(令牌无效) - Error parsing XML: not well-formed (invalid token) while making app 错误解析XML; 格式不正确(令牌无效) - Error Parsing XML; not well formed (invalid token)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM