Search code examples
androideclipseeclipse-pluginbuild-processadt

Prevent Eclipse from building .xml files


I recently had a complete new install of my (archlinux) System. For that reason I installed the latest Eclipse (JUNO 4.2.1 and I regret it) along with the latest ADT Plugin(SDK rev 21).

Now I'm observing a bug which I have had before but was fixed since then: When I'm in the Java Perspective, editing an xml file and click on the green "play" Button to push the new code on my phone, Eclipse starts building that particular XML file instead of building the project this xml file belongs to. I get an 'XMLfilename.xml.out" file which I cannot open. If I want to build the project, I have to delte the 'XMLFilename.xml.out' file, switch to a java file and re-click on that 'play' button in order to make it work.

Can this be considered as Bug or some misconfiguration on my side? And If it is a Bug, who is responsible for it? Eclipse JUNO, ADT or another prog? Is one able to fix it?


Solution

  • This occurs when you install some of the xml-plugins in eclipse. The xml plugins are not needed to develop android apps since the ADT comes with its own set of tools to work with xml files (i.e. Layout editor, etc). If you do not need those xml plugins for other projects you can remove them. Eclipse recognizes the xml files as part of your android project and directly starts the android project (instead of the xml-parser which checks the xml file).

    Delete xml.out file then close your xml file or just switch to java file and then run the project configuration you want to run.

    OR

    Just try doing this (which is better option and worked for me)-

    Windows > Preferences > Launching > Launch Operation > Select Always launch previously launched application