Android sdk main.out.xml parsing error?

I just launched the new Android project "WeekendStudy" to continue learning about Android development, and I linked the default hello weekendstudy compilation / launch. I think I skipped a step in setup and setup, but I don’t understand where. My AVD is configured, installed, and running.

When I click run, the SDK creates the main.out.xml file and then fails:

[2010-03-06 09:46:47 - WeekendStudy]Error in an XML file: aborting build. [2010-03-06 09:46:48 - WeekendStudy]res/layout/main.xml:0: error: Resource entry main is already defined. [2010-03-06 09:46:48 - WeekendStudy]res/layout/main.out.xml:0: Originally defined here. [2010-03-06 09:46:48 - WeekendStudy]/Users/mobibob/Projects/workspace-weekend/WeekendStudy/res/layout/main.out.xml:1: error: Error parsing XML: no element found [2010-03-06 09:48:16 - WeekendStudy]Error in an XML file: aborting build. [2010-03-06 09:48:16 - WeekendStudy]res/layout/main.xml:0: error: Resource entry main is already defined. [2010-03-06 09:48:16 - WeekendStudy]res/layout/main.out.xml:0: Originally defined here. [2010-03-06 09:48:16 - WeekendStudy]/Users/mobibob/Projects/workspace-weekend/WeekendStudy/res/layout/main.out.xml:1: error: Error parsing XML: no element found [2010-03-06 09:55:29 - WeekendStudy]res/layout/main.xml:0: error: Resource entry main is already defined. [2010-03-06 09:55:29 - WeekendStudy]res/layout/main.out.xml:0: Originally defined here. [2010-03-06 09:55:29 - WeekendStudy]/Users/mobibob/Projects/workspace-weekend/WeekendStudy/res/layout/main.out.xml:1: error: Error parsing XML: no element found [2010-03-06 09:55:49 - WeekendStudy]Error in an XML file: aborting build. [2010-03-06 09:55:49 - WeekendStudy]res/layout/main.xml:0: error: Resource entry main is already defined. [2010-03-06 09:55:49 - WeekendStudy]res/layout/main.out.xml:0: Originally defined here. [2010-03-06 09:55:49 - WeekendStudy]/Users/mobibob/Projects/workspace-weekend/WeekendStudy/res/layout/main.out.xml:1: error: Error parsing XML: no element found 
+55
android xml parsing avd
Mar 06
source share
17 answers

Best fix: Eclipse -> Window -> Settings -> Launch / Debugging -> Launch -> Lauch Configuration

Crossroads: The filter checks the launch and Cross configuration types as well: XSL (at the end of the list)

Fix the problem forever!

+95
Mar 29 '11 at 8:10
source share

Yes, same problem with me.

To prevent the creation of out.xml.

  • edit the xml file, a completely natural way to do ....

  • save and close the XML file

  • Open any .java file in src /

  • Double-click the file to make sure it has focus and the cursor is there.

  • Run ... should now be OK

If this happens, do it ...

  • edit the xml file, a completely natural way to do ....

  • Run ... crash due to dreaded out.xml file

  • Delete the file / res / ___. Out.xml

  • Close all files in the IDE view

  • Project ... Clean ...

  • Open any .java file in src /

  • Double-click the file so that it has focus and the cursor is there.

  • Run ... should now be OK

+27
Sep 14 '10 at 0:19
source share

you have to start the project, because the Android application will not only scoop up the icon - Run

+11
Apr 19 '10 at 2:30
source share

Delete xxx.out.xml, if you still cannot start, follow these steps. Eclipse -> Project-> Clean ...-> Select Project-> OK

Place the cursor in * .java, run it

+8
Jul 05 2018-10-10T00:
source share

I tried to start from the wrong part of the project, since my toolbar was not connected correctly. I am still developing the details, and I will edit it when I fully find out.

First of all, it was a new workspace that I wanted to create for organizing my various unrelated projects. As a result, targeting was not configured on the RUN of the toolbar (i.e., In History), so he tried to run the main.xml file.

Right-click on one of the * .java files and select "run as ...", then you can create a launch configuration with its purpose (select or create AVD), a project, etc. I recommend visiting each tab and looking at the default settings for your situation.

Then, lean back and wait for the emulator to load for the first time (mine took about 1-2 minutes on a Macbook).

+5
Mar 06 '10 at 16:25
source share

This seems to be a problem with one of the eclipse XML plugins, I think it is something in web tools. Previously, I could run the application from any file, be it XML or java, but as soon as I installed the web tools, I started to see this error. This is really annoying, I'm so used to pressing Ctrl-F11 to create an application ... but if you do this in an XML file, you will get this error. The fix mentioned above does work, but these are additional steps and less effective to right-click a project and select Run As ... blah blah. If someone chooses a clean solution - in addition to removing web tools, of course, to return my shortcut to me, I would be grateful.

+2
04 Sep '10 at 6:32
source share

I am new to Android app development training. I also ran into this problem and was disappointed. Uninstall the entire Android SDK and reinstall, believing that there is some problem.

To my surprise, the solution is very simple. If you leave a mouse click on the xml file and go to "Run", this will result in an error. So the solution is simple. Click on the .java file or the Top of the whole tree (example: if the structure looks like this: Firstapp> Src> Firstapp.java, just click on Firstapp), and then run.

It will work smoothly.

+1
May 12 '11 at 1:01
source share

@neil patel> Just repeating the answer above ... let me know if I need to clarify it.

Right-click one of the * .java files and select "run as ...", then you can create a launch configuration with its target (select or create AVD), a project, etc. I recommend visiting each tab and the default values ​​for your situation.

0
Jun 07 '10 at 17:53
source share

I had the same problem and tried many different things many times. Finally I gave up, copied the entire project tree to another location. I created a new project for Android and copied the src, res.layout, res.values ​​files and my added custom images under the ability to draw. Right-click the project in the package explorer and click Refresh. Now it works again. This is probably not the best way to fix it, but it works :-)

0
Jul 21 '10 at 21:39
source share

Here is a blog post that I just found that solves the problem definitely!

0
Feb 01 2018-11-11T00:
source share

I believe that I have an answer. I also managed to run only any selected ol file. Something changed, and suddenly I got a terrible parsing error xxx.out.xml. Well, I found a way around this. Someone please acknowledge that this works for you too.

Click "Window" β†’ "Settings" Select or filter the search to run (start / debug)

At the bottom of the right pane, locate the Lauch operation and select "Always launch a previously launched application"

Clean the project and run it correctly at least once. I tested this and seemed to work consistently.

Greetings

0
Feb 11 2018-11-11T00:
source share

Try and make sure that the valid source is running or not.

Delete xxx.out.xml, if you still cannot start, follow these steps. Eclipse -> Project-> Clean ...-> Select Project-> OK

0
Aug 27 '11 at 12:31 on
source share

I also ran into this problem.

When using eclispe, make sure that before clicking Run, any file selected in Project is not an XML file. With this, you will never get this error. Also, make sure you delete everything .... out.xml from your workspace.

I spend almost 30 minutes to find out the reason for this and found this solution.

0
Jul 08 2018-12-12T00:
source share

I ran into this problem, but the answers above do not help me. Looking around, I fixed it myself, and I think I should write a solution.

The android compiler creates * .out.xml if you run the project as XSL. To fix this, you must take the following steps:

  • click the arrow on the right side of the Run button, select Run Configurations. On the left side of the popup windows, delete all subitems in XSL.
  • go to the beginning of the settings in the settings => Run / debug => Run. Check the "Filter selected startup ..." box, and then uncheck the XSL box when you test your Android application.

Hope this helps.

0
Aug 20 2018-12-12T00:
source share

As stated in How to stop Eclipse from trying to run XML files? : In the "Settings" β†’ "Launch / Debugging β†’ Launch" section, you can select "Always launch previously launched application". This is useful if you use the shortcut Ctrl + F11.

0
Nov 23 '12 at 9:40
source share

I had the same problem as the wall, my solution was:

Just import it again without creating a new project

first try doing this:

Eclipse β†’ Project-> Clean ...-> Select a project β†’ OK

If this does not work, try this.

1. copy the project folder from the workspace to another, where else (the desktop will be fine) 2.delete project from eclipse (check the "Delete project contents from disk" box) 3. Copy the project again this time from the desktop to workspace 3. import the project again (File β†’ Import β†’ General β†’ Existing project in the workspace) 4. This worked for me ..

hope this helped

-one
Aug 12 '10 at 13:57
source share

Eclipse -> Project-> Clean ... restart your project, and that's fine

-one
Dec 22 '10 at 13:05
source share



All Articles