tags:

views:

170

answers:

2

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"&gt;
    <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?

+1  A: 

Do you have any extraneous characters after the closing tag (I'm assuming what you posted is just an excerpt from the file, since it obviously won't work without at least a closing tag)?

alien.angel
nope, the file is exactly what i posted except that </selector> is there. I edited my original post to add that in but for some reason its still not showing.Anyway i do have the closing tag there.ugh so weird..?
Capsud
+1  A: 

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.

Paul Butcher
wow...well spotted good man :)
Capsud