Problem when running XML file

Put your problem here if it does not fit any of the other categories.

Problem when running XML file

Postby Pazvanti » Wed Jun 30, 2010 5:13 pm

I am just starting with Android Development and have a few minor problems.
First of all, sometimes I don't always know what packages to import. Is there a way to import them automatically? I am coding in Ecplise.
2nd, If, because I am not attentive, I hit the "Run" button but with an XML file opened. This results in making a another xml file name <filename>.out.xml that has errors. If I delete the file I still have a red x on my project folder. And when I try to run the actual java file it sais that the project contains error. The only solution is to delete the entire project and recreate it. But this is uncovinient to always recreate the project, recopy the entire code and everything. Does anyone know how to solve this problem? Thanks
Pazvanti
Junior Developer
Junior Developer
 
Posts: 12
Joined: Wed Jun 30, 2010 5:06 pm

Top

Re: Problem when running XML file

Postby anarche » Thu Jul 01, 2010 12:24 am

1) press Ctrl-Shift-O will organise your imports in Eclipse.
2) Clean the project

http://www.eclipse.org/

this is an android forum
anarche
Master Developer
Master Developer
 
Posts: 369
Joined: Sun Apr 11, 2010 5:21 am

Re: Problem when running XML file

Postby pranav09 » Thu Jul 01, 2010 5:54 am

Hi Pazvanti,

For running the Android application, you have to run .java file. If you run the .xml file, every time you will get .xml.out file. So, It's not a proper way to run application. At the end, right click on the particular project and run it. That's all.


Thanks.
_____________
Pranav
Pranav
User avatar
pranav09
Senior Developer
Senior Developer
 
Posts: 128
Joined: Mon Jan 19, 2009 12:01 pm
Location: Ahmedabad, India

Re: Problem when running XML file

Postby anarche » Thu Jul 01, 2010 6:08 am

Or go to the Run Menu -> Run Configurations. Set up the config to the appropriate Activity and you can run your project with only a text file open...
anarche
Master Developer
Master Developer
 
Posts: 369
Joined: Sun Apr 11, 2010 5:21 am

Re: Problem when running XML file

Postby Pazvanti » Thu Jul 01, 2010 6:36 am

Thank you all for your replays. I managed to solve all problems. Still getting the hang of programming for android...but hopefully I will manage to learn everything soon.
Pazvanti
Junior Developer
Junior Developer
 
Posts: 12
Joined: Wed Jun 30, 2010 5:06 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 13 guests