I just started a new Android project, \"WeekendStudy\" to continue learning Android development and I got stumped compiling the default \'hello weekendstudy\' compile / run.
you should run the project as android application not only cilck the icon--Run
I was trying to run from the wrong part of the project since my toolbar was not hooked up correctly. I am still working out the details and I will edit this when I figure it out completely.
First of all, this was a new workspace that I wanted to create to organize my different unrelated projects. As a result, the RUN of the toolbar did not have a target configured (i.e., in the history), so it tried to run my main.xml file.
Right-click on one of the *.java files and select 'run as...' then you can create a run configuration with its target (pick or create an AVD), the project, etc. I recommend visiting each of the tabs and review the defaults for your situation.
Then, sit back and wait for the emulator to load for the first time (mine took about 1 to 2 minutes on a Macbook).
I believe I have the answer. I too was able to run with just any ol' file selected. Something changed and suddenly I was getting the dreaded xxx.out.xml parse error. Well, I found a way around it. Someone please confirm for me that this works for you too.
Click Window->Preferences Select or filter search for Launching(run/debug)
In the bottom of the right hand pane, look for Lauch Operation and select "Always launch the previously launched application"
Clean your project and run it correctly at least once. I tested this out and it seems to work consistently.
Cheers
I was also facing this issue.
When using eclispe make sure before clicking "Run", Any file selected in Project is not the XML file.With this you will never get this error. Also, Make sure you have deleted all the ....out.xml from your workspace.
I spend almost 30 Min to know the root cause of this and found this solution.
I faced this problem but above answers do not help me. After look around, I fixed this by my self and I think I should write down the solution.
The android compiler create *.out.xml if you run the project as XSL. to fix this, you should do these steps:
Hope this helps.
Yeah, same problem with me.
To prevent out.xml from being created.
edit an XML file, a perfectly natural thing to do....
save and close the XML file
Open any .java file in src/
Double click in the file to ensure it has focus and the cursor is in there.
Run... should be OK now
If it happens, do this...
edit an XML file, a perfectly natural thing to do....
Run... crash due to dreaded out.xml file
Delete the /res/___.out.xml file
Close all files in the IDE view
Project...Clean...
Open any .java file in src/
Double click in the file so it has focus and the cursor is in there.
Run... should be OK now