Android SDK, Eclipse, Geany, and build.xml

Code junkies hangout here

Moderators: ChriThor, LXF moderators

Android SDK, Eclipse, Geany, and build.xml

Postby kidcarnage » Wed Jun 29, 2011 9:52 am

I am runnning Android Code from the Linux Format Coding Academy.

When compiling my build.xml document in eclipse for the android code I get the error /home/crichton/android_code/build.xml:37: Cannot find /Users/juliet/android-sdk-mac_x86 /tools/ant/pre_setup.xml imported from /home/crichton/android_code/build.xml

In looking in the build.xml file I see
<import file="${sdk.dir} /tools/ant/pre_setup.xml" />
The sdk.dir is redirecting the output to /Users/juliet/android-sdk-mac_x86 /tools/ant/pre_setup.xml
If I take the sdk.dir out I can append directories to the path to try and get the right ant tool to work. However, if I take sdk.dir out the project dir of the coding project gets automatically appended to the file.

How can I edit sdk.dir to let me tell eclipse where ant is? Ant works from the terminal and it is in my ~/bashrc file with the $PATH showing all directories available to the ant tools.

If I use geany to compile it tells me that package does not exist none of my import and such are getting imported.

From my reading this is standard and you need Ant to compile a build.xml file to include your android libraries?

If anyone can help me put the rest of the information I am lacking or misunderstanding thanks.

Also the author of the article telling you how to build the Android programs name is Juliet so that seems to me to much of a coinciidence with the error being recieved.
Posts: 1
Joined: Wed Jun 29, 2011 9:20 am
Location: Australia

Postby julietkemp » Wed Jun 29, 2011 11:06 am

Hi -- it looks like this is an Eclipse-specific error, & I confess that I'm not at all familiar with Eclipse (being a command-line person :) ).

But I think you want to try step 14 under 'Android Eclipse Plugin' here:

Alternatively, you could edit directly; however, the boilerplate on this file advises against doing this as it's supposed to be auto-generated by Android Tools. I'm afraid I don't know how/why/whether Eclipse is supposed to interact with this. You could also just delete it & see if Eclipse regenerates it?

Apologies anyway that it slipped through into the sample code.
Posts: 5
Joined: Tue Mar 16, 2010 6:24 pm

Return to Programming

Who is online

Users browsing this forum: No registered users and 2 guests