Valid XML file gives “failed to parse” error in Android ADT

前端 未结 8 1580
执笔经年
执笔经年 2020-12-19 18:08

I have made a XML file:



           


        
相关标签:
8条回答
  • 2020-12-19 18:36

    I also ran into this. The layout xml files and main.xml would not parse. if you chose the graphical view for main.xml you would not get any buttons (in my case). What i found is that Eclipse was set to C++ rather than java. Setting it to the java perspective, closing, then reopening Eclipse fixed the issue.

    Now Eclipse is doing other strange stuff like forgetting to connect to the phone intermittently.

    0 讨论(0)
  • 2020-12-19 18:42

    I'm not sure it's the same, but Similar issue happened to me when updating to ADT 15, in a library project. this is the google issue that currently still opened: 21046.

    That's what worked for me:

    1. Remove the library declaration of the project.
    2. Open the layout causing the error (the one which using the selector) in graphical layout.
    3. Clean the project (Project -> Clean)
    4. Close and reopen eclipse. (the layout should be ok now)
    5. You can set the project as library again.

    Hope this helps! (if it's still relevant...)

    0 讨论(0)
提交回复
热议问题