加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

XML:尾部不允许内容

发布时间:2020-12-16 07:53:00 所属栏目:百科 来源:网络整理
导读:我收到这些错误 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/
我收到这些错误
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>

知道XML的人可能很简单.任何想法?

如果您从链接到的网站粘贴,您有两个小连字符,你不想要.在< / selector>结束之后和刚刚在第一个< item>之前的一个.摆脱那些,一切都会好起来的.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读