Stop deleting your .out.xml!
Although it is true that it will “fix” your problem, it will cause other problems, especially if you are developing and working with the user interface with the tab “graphic layout” in Eclipse. What happens is that you start the configuration, mixed up, you go to run it, but try to run .out.xml so that it does not work. The solution should not start deleting files.
Click the green circle to the right of the “run” button to display a list of options and select “Run configurations”. Configure it for an emulated Android device. When you run the code, use this custom run. Also, run java from the main file.
source share