XML: content is not allowed in trailing section
I'm getting these errors
Multiple annotations found at this line: - error: Error parsing XML: not well-formed (invalid token) - Content is not allowed in trailing section.
on this XML file...
<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>
Probably quite simple for you people who know XML. Any idea?
If you pasted it from the site you link to, there are two little hyphens you don't want. One after the close of </selector>
and one just before the first <item>
. Get rid of those, and all will be well.
<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.
结束标记后面是否有任何无关字符(我假设您发布的内容仅仅是文件的摘录,因为如果没有至少一个结束标记,它显然不起作用)?
链接地址: http://www.djcxy.com/p/34920.html上一篇: org.jdom.input.JDOMParseException:尾部不允许有内容
下一篇: XML:尾部不允许有内容