Hi guys,
I followed the tutorial at these 2 locations :
- I did the java/brew/ant installation based on this.
- I only tried the sample project.
Only difference is the Android SDK version. It installed ‘/build-tools/23.0.2’ instead of the ‘/build-tools/21.1.2’.
echo "export PATH=${PATH}:${ANDROID\_SDK}/build-tools/23.0.2" \>\> ~/.bash\_profile
I am getting this error below when sending the ‘ant’ command in Terminal. I tried some solutions online, but the error is the same. I verified that ‘/Library/Java/JavaVirtualMachines/1.6.0.jdk’ exists.
Thanks
ant --execdebug exec "/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java" -classpath "/usr/local/Cellar/ant/1.9.6/lib/ant-launcher.jar" -Dant.home="/usr/local/Cellar/ant/1.9.6" -Dant.library.dir="/usr/local/Cellar/ant/1.9.6/lib" -Djikes.class.path=":/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../Classes/alt-rt.jar:/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../Classes/alt-string.jar:/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../Classes/charsets.jar:/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../Classes/classes.jar:/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../Classes/dt.jar:/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../Classes/jce.jar:/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../Classes/jconsole.jar:/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../Classes/jsse.jar:/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../Classes/management-agent.jar:/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../Classes/ui.jar" org.apache.tools.ant.launch.Launcher -cp "" "-lib" "/usr/local/share/ant" Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.launch.Launcher at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247)