3

I was working on an android project, and while designing i noticed something strange and i was unable to understand why it was so....

What happened was, i created an xml file let's say named my_main_view.xml and i started working on it, while my design was in progress, for test purpose i ran my application and the app did not run and a file named my_main_view.out.xml is created. Which does not allow the application to run anymore until this newly created file deleted.

Deleting the file works fine but it's a temporary solution. It may be created anytime, when you run the application in eclipse.

Another solution which i found was to load the previously launched application which is far better than deleting the file..... it is...

In Eclipse ADT Goto:

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

But still the reason for this file creation is unknown to me. if anyone knows why this file is created and what is the purpose of this file please let all of us know....any help is appreciated...!!!

Usama Sarwar
  • 8,922
  • 7
  • 54
  • 80
  • i did not faced it ever . so i dont think its a general problem . you should check your development environment – Shailendra Singh Rajawat Nov 02 '11 at 12:12
  • It is infact, not very general but some people have faced it for sure as i have searched through the internet..Solutions are there but no reason that why it is created. – Usama Sarwar Nov 02 '11 at 12:14

3 Answers3

3

I think the answer to your question can be found in this other question: Error starting an Android program

Delete all main.xml.out files in your project. Then, do NOT attempt to run the project with an XML file as the active tab in the editor in Eclipse -- switch to a Java file. It is the attempt to run the project with an XML file as the active tab that creates those .out files and messes up the system.

There's probably a more sophisticated workaround, but I am not an Eclipse user, so I do not know what it is.

Community
  • 1
  • 1
Sander van't Veer
  • 5,930
  • 5
  • 35
  • 50
  • i did not ask for the solution as i have already found it and while posting the question i have posted two possible solutions...my question is to know the reason why it happens so...!!! – Usama Sarwar Nov 02 '11 at 12:19
  • Which is why I made the text bold.. *It is the attempt to run the project with an XML file as the active tab that creates those .out files and messes up the system.* – Sander van't Veer Nov 02 '11 at 12:20
  • Yes i have read that...but why..???? i know this thing that when you run the project having active tab of some xml it creates that file but again why so..??? Why isn't it created everytime..??? and what's the logic behind..? – Usama Sarwar Nov 02 '11 at 12:22
  • 1
    There is no real reason for it as far as I can find. Most people say it's either a bug in Eclipse, a bug in the Android toolkit, or a bug in a plugin for Eclipse. Some people attribute it to a plugin called `Eclipse XSL Developer Tools`. Uninstalling that plugin from Eclipse fixed it for several people apparently. Maybe that will work for you as well. That's all I can say though, since I have never experienced this problem myself. – Sander van't Veer Nov 02 '11 at 12:28
  • hmm....so one can conclude that there is no specific reason for that..??? anyways thank you so very much for a detailed discussion...:-) Couldn't find exact reason but still got to know a lot of things..thanks again..:-) – Usama Sarwar Nov 02 '11 at 12:52
2

This occurs when you install some of the xml-plugins in eclipse. The xml plugins are not needed to developed 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).

Peanut
  • 3,753
  • 3
  • 31
  • 45
  • 1
    I just had this issue... and yesterday I installed XML plugins for Eclipse, so it very well could be the cause. It happens when I have an extra blank line between attributes of a UI element in a layout XML file. – GilliMonsta Feb 09 '12 at 22:13
0

It happened with me too. I tried all the above methods. But it still got created and prevented the code from executing. I figured out that I was trying to run my .xml file, but I should be running the .java file. It may be that you are doing the same. So make sure that you are running the .java file and not the .xml file.

Elletlar
  • 3,136
  • 7
  • 32
  • 38