Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


dylanh724

6 posts

Wannabe Geek


#60677 30-Apr-2010 09:36
Send private message

Hello,

When I load a default setup android application with Eclipse Galileo ("Hello Android") and start it, it works (Literally I just open a new project, name it, and click run without any changes).

Now, if I open res/layout/main.xml -- even if I don't change ANYTHING, just view, when I run the program I get errors:

[2010-04-29 17:30:07 - HelloAndroid] Waiting for HOME ('android.process.acore') to be launched...
[2010-04-29 17:30:09 - HelloAndroid] emulator-5554 disconnected! Cancelling 'com.example.helloandroid.HelloAndroid activity launch'!
[2010-04-29 17:30:19 - HelloAndroid] Error in an XML file: aborting build.
[2010-04-29 17:30:19 - HelloAndroid] res\layout\main.xml:0: ERROR Resource entry main is already defined.
[2010-04-29 17:30:19 - HelloAndroid] res\layout\main.out.xml:0: Originally defined here.
[2010-04-29 17:30:19 - HelloAndroid] C:\Users\Xblade\workspace\HelloAndroid\res\layout\main.out.xml:1: ERROR Error parsing XML: no element found
[2010-04-29 17:30:43 - HelloAndroid] Error in an XML file: aborting build.

Being extremely new to Android programming, I'm completely lost -- I understand if I changed something, but not changing anything causes this error! How am I getting this error by running the program after I simply open this file?

Also, it creates a main.out.xml file that didn't exist previously that has nothing in it ("This document is empty").

Help =P Thanks!

Create new topic
Linuxluver
5833 posts

Uber Geek
+1 received by user: 1639

Trusted
Subscriber

  #325395 30-Apr-2010 18:29
Send private message

I followed the instructions to the letter and it worked for me. Try going through the process again, step by step. It looks like you have somehow got it looking at the e wrong XML file




_____________________________________________________________________

I've been on Geekzone over 16 years..... Time flies.... 




deyur
19 posts

Geek


  #325415 30-Apr-2010 19:25
Send private message

Try deleting main.out.xml, if it still exists? It might have been created during the build, but it shouldn't remain after compilation...

dylanh724

6 posts

Wannabe Geek


  #325485 1-May-2010 03:26
Send private message

That worked. I found out that when I click "run" looking at the xml page, it was trying to run the xml page instead of the java program. When I delete the created out.xml page and ran it looking at the java app, everything worke.d Thanks ;D



deyur
19 posts

Geek


  #325562 1-May-2010 13:22
Send private message

It can help to create a Run Configuration and just use that all the time rather than letting Eclipse try and build whatever you happen to be looking at. You can see your recently used configurations by clicking the dropdown next to the Run button.

Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.