ANT: taskdef class com.android.ant.SetupTask cannot be found
I have seen a lot of posts with this problem. So there are some tips…
This path has to be same as location of SDK installation, but be aware, it cannot contain diacritics!
Feel free asking questions in comments.
Wrong
Path in local.properties.
sdk.dir=/home/pk/huč/android-sdk-linux_x86
Building in terminal (BUILD FAILED)
pk@pk-laptop:~/Programming/MyAndroidAppProject$ ant
Buildfile: /home/pk/Programming/MyAndroidAppProject/build.xml
BUILD FAILED
/home/pk/Programming/MyAndroidAppProject/build.xml:46: taskdef class com.android.ant.SetupTask cannot be found
using the classloader AntClassLoader[]
Total time: 0 seconds
Right
Path in local.properties (removed diacritics from “huč“).
sdk.dir=/home/pk/huc/android-sdk-linux_x86
Building in terminal (BUILD SUCCESSFUL)
pk@pk-laptop:~/Programming/MyAndroidAppProject$ ant
Buildfile: /home/pk/Programming/MyAndroidAppProject/build.xml
[setup] Android SDK Tools Revision 7
[setup] Project Target: Google APIs
[setup] Vendor: Google Inc.
[setup] Platform Version: 2.2
[setup] API level: 8
[setup]
[setup] ------------------
[setup] Resolving library dependencies:
[setup] ------------------
[setup] Ordered libraries:
[setup] ------------------
[setup]
[setup] WARNING: No minSdkVersion value set. Application will install on all Android versions.
[setup]
[setup] Importing rules file: tools/ant/ant_rules_r3.xml
help:
[echo] Android Ant Build. Available targets:
[echo] help: Displays this help.
[echo] clean: Removes output files created by other targets.
[echo] compile: Compiles project's .java files into .class files.
[echo] debug: Builds the application and signs it with a debug key.
[echo] release: Builds the application. The generated apk file must be
[echo] signed before it is published.
[echo] install: Installs/reinstalls the debug package onto a running
[echo] emulator or device.
[echo] If the application was previously installed, the
[echo] signatures must match.
[echo] uninstall: Uninstalls the application from a running emulator or
[echo] device.
BUILD SUCCESSFUL
Total time: 2 seconds
hii dear while writting command
c:\OpenGTS_2.3.0>ant all
Buildfile:build.xml
BUILD FAILED
c:\OpenGTS_2.3.0\build.xml>taskdef class com.android.ant.SetupTask cannot be found
this type of error arises in windows xp sp2
can anyone help please.
mail-pmanas88@gmail.com
Salem,
hi,
i’m running this command:
ant -f build.xml -Dandroid-home=«C:\Program Files\Android\android-sdk» -DWTK-home=«C:\Users\mohamed\workspace\proguard4.6»
racine du SDK android :C:\Program Files\Android\android-sdk
racine du répertoire de proguard:C:\Users\mohamed\workspace\proguard4.6
but the same error appears
please give me a solution
thanks
Thank you for the trick: it worked like a charm.
My pleasure, I like to know, that it is useful.
Thanks