XML:尾随部分不允许使用内容

Cap*_*sud 17 xml

我收到这些错误

Multiple annotations found at this line:
    - error: Error parsing XML: not well-formed 
     (invalid token)
    - Content is not allowed in trailing section.

在这个XML文件上......

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item 
    android:state_enabled="false"
        android:drawable="@drawable/btn_red" />
    <item 
        android:state_pressed="true" 
        android:state_enabled="true"
        android:drawable="@drawable/btn_orange" />
    <item 
        android:state_focused="true" 
        android:state_enabled="true"
        android:drawable="@drawable/btn_orange" />
    <item 
        android:state_enabled="true"
        android:drawable="@drawable/btn_black" />
</selector>
Run Code Online (Sandbox Code Playgroud)

对于了解XML的人来说可能非常简单.任何的想法?

Pau*_*her 23

如果您从链接到的站点粘贴它,则有两个您不想要的小连字符.一个在收盘后</selector>,一个在第一个收盘前<item>.摆脱那些,一切都会好起来的.

  • 无法从问题内容中发现错误,链接已经死亡. (15认同)

pat*_*135 5

<resources>
    <string name="app_name">Test App</string>
</resources>
testData("test");

If in any xml file unfortunately this type of line is remaining then this error is occur. 
Run Code Online (Sandbox Code Playgroud)