Ant cannot find pre_setup.xml for Android project

I started a game with Android programming, and I got the basic setup of the project a couple of weeks ago and followed the tutorial from the magazine. I know that I managed to compile a basic ant compilation, but now I return to it, it fails with a slightly strange message:

  $ ant debug
 Buildfile: /home/taft/android_code/countdown/build.xml

 BUILD FAILED
 /home/taft/android_code/countdown/build.xml:37: Cannot find /home/pete/android-sdk-linux_x86/tools/ant/pre_setup.xml imported from /home/taft/android_code/countdown/build.xml

 Total time: 0 seconds

taft is my username; I have sdk installed in ~ / bin / and my path is set up reasonably (I think):

  $ echo $ PATH
 / home / taft / bin: / home / taft / bin / android-sdk-linux_x86 / tools: / usr / local / sbin: / usr / local / bin: / usr / sbin: / usr / bin: / sbin: / bin: / usr / games: / home / taft / bin / android-sdk-linux_x86 / platform-tools /

I don't have a pet user, and I'm not sure where he gets this path from; lines 36 and 37 of the build.xml file are as follows:

<!-- Required pre-setup import --> <import file="${sdk.dir}/tools/ant/pre_setup.xml" /> 

Now I assume that sdk.dir should be automatically populated with something ... but I don't know what? Does anyone else run into this problem or have suggestions on what I can try next?

+4
source share
1 answer

Submit your comment After long digging, I think I fixed it

  $ android update project -p. 

I went into the project and let go of the above team, which should update any projects. Running the command, I got the following result:

  $ android update project -p. 
 Updated local.properties 
 File build.xml is too old and needs to be updated. 
 Updated file ./build.xml 
 Updated file ./proguard.cfg 

After that, everything seems to be building again. I hope someone else finds this useful, as I have been at a standstill from this for about an hour (OK, it was late last night, so I was not at my best).

+9
source

All Articles