Android sdk main.out.xml parsing error

前端 未结 3 1392
Happy的楠姐
Happy的楠姐 2020-12-10 06:07

I just started a new Android project, helloword\" to continue learning Android development and I got stumped compiling the default \'helloword\' compile / run. I think that

相关标签:
3条回答
  • 2020-12-10 06:30

    Never run your project from xml file .Open your java code then run it...If you run it from xml you will get that error.Its also same for manifest file

    0 讨论(0)
  • 2020-12-10 06:34

    Had the same problem, this fixed it for me.

    1. Delete activity_main.out.xml
    2. Double click on a .java file
    3. Hit F11
    0 讨论(0)
  • 2020-12-10 06:35

    It is not your fault. When you try to compile a android project from its xml resource , eclipse considers it as executing xml file and so you get some output from it, in the same name of the xml with .out.xml extension.

    To avoid this, you have to right click the project and select run as -> Android Application for the first time and then follow the below steps,

    Window -> Preferences -> Run/Debug -> Launching -> Launch Operation -> Always Launch the previously launched application

    Once you provide this in the window->preferences, from the next time when you press "run" or "ctrl+f11" from even a xml file, your project will get executed.

    EDIT: You must also delete res/layout/*.out.xml, the file that Eclipse created and you do not need it.

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