I downloaded the most recent version of Android for Linux (android-sdk_r05-linux_86.tgz). I was trying to use the the Android Ant task(s) for packaging, building, and deploying my code. I should mention that I’m running AMD64, but I have the 32-bit libraries installed. The Android Ant tasks are all broken.
First, the start-emulator task never gets the emulator running. It does get past starting adb, but then it just sits there.
Second, the SDK is missing the AAPT binary in the tools directory. So, the example notepad sample application will not even package correctly.
java.lang.IllegalStateException: Can’t find aapt inside the sdk
at /home/user/bin/android-sdk-linux_86
at com.googlecode.autoandroid.lib.AndroidTools.locateTool(AndroidTools.java:116)
at com.googlecode.autoandroid.lib.AndroidTools.startTool(AndroidTools.java:103)
at com.googlecode.autoandroid.lib.AndroidTools.startTool(AndroidTools.java:91)
at com.googlecode.autoandroid.lib.UnixAndroidTools.aapt(UnixAndroidTools.java:9)
I have all the dependencies configured for Android. I can run it from the command line just fine.
I assume the Ant code is out of sync with the recent SDK updates. Can anyone shed some light on this problem? At this point, I’m considering writing my own Python scripts to interact with the Android SDK. Ugh.
I have written three books all using the Android Ant build scripts. Trust me, they work.
Run the
androidcommand and launch the emulator from AVD Manager window that appears. AFAIK, there is nostart-emulatortask in Ant — in fact, I’m not aware that there ever has been one.If you are looking in
$ANDROID_HOME/tools/(where$ANDROID_HOMEis where you unpacked the SDK), you aren’t supposed to find aapt there. That directory is for tools that directly support all API levels. API-level-specific tools, likeaapt, will reside in$ANDROID_HOME/platforms/$SDK/tools/(where$SDKis the name of some Android version, likeandroid-2.1).If you do not have anything in
$ANDROID_HOME/platforms/, please follow step 4 of the installation instructions.