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.


6 posts

Wannabe Geek


Topic # 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
5106 posts

Uber Geek
+1 received by user: 1059

Trusted
Subscriber

  Reply # 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'm on a high fibre diet. 

 

High fibre diet


19 posts

Geek


  Reply # 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...



6 posts

Wannabe Geek


  Reply # 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

19 posts

Geek


  Reply # 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

Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





News »

Microsoft Dynamics 365 Business Central launches
Posted 10-Jul-2018 10:40


Spark completes first milestone in voice platform upgrade
Posted 10-Jul-2018 09:36


Microsoft ices heated developers
Posted 6-Jul-2018 20:16


PB Technologies charged for its extended warranties and warned for bait advertising
Posted 3-Jul-2018 15:45


Almost 20,000 people claim credits from Spark
Posted 29-Jun-2018 10:40


Cove sells NZ's first insurance policy via chatbot
Posted 25-Jun-2018 10:04


N4L helping TAKA Trust bridge the digital divide for Lower Hutt students
Posted 18-Jun-2018 13:08


Winners Announced for 2018 CIO Awards
Posted 18-Jun-2018 13:03


Logitech Rally sets new standard for USB-connected video conference cameras
Posted 18-Jun-2018 09:27


Russell Stanners steps down as Vodafone NZ CEO
Posted 12-Jun-2018 09:13


Intergen recognised as 2018 Microsoft Country Partner of the Year for New Zealand
Posted 12-Jun-2018 08:00


Finalists Announced For Microsoft NZ Partner Awards
Posted 6-Jun-2018 15:12


Vocus Group and Vodafone announce joint venture to accelerate fibre innovation
Posted 5-Jun-2018 10:52


Kogan.com to launch Kogan Mobile in New Zealand
Posted 4-Jun-2018 14:34


Enable doubles fibre broadband speeds for its most popular wholesale service in Christchurch
Posted 2-Jun-2018 20:07



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.

Alternatively, you can receive a daily email with Geekzone updates.