的taskdef类com.android.ant.SetupTask不能使用ClassLoader AntClassLoader找到[] [英] taskdef class com.android.ant.SetupTask cannot be found using the classloader AntClassLoader[]
问题描述
我试图得到一些简单的Android应用程序从书开头的Android 4'的工作。我跑在源$ C $ C目录一只蚂蚁并收到此错误:
I'm trying to get some simple Android apps working from the book 'Beginning Android 4'. I ran ant on one of the source code directories and received this error:
# ant debug
Buildfile: NowRedux/build.xml
BUILD FAILED
NowRedux/build.xml:49: taskdef class com.android.ant.SetupTask cannot be found using the classloader AntClassLoader[]
这是造成这个build.xml中的线条是:
The lines in build.xml which is causing this are:
<taskdef name="setup"
classname="com.android.ant.SetupTask"
classpathref="android.antlibs" />
有谁知道我怎么能解决这个问题?我尝试下载网址为: http://ant.apache.org/ 蚂蚁和手动安装,但没有帮助。任何想法?
Does anyone know how I can resolve this? I tried downloading ant at http://ant.apache.org/ and manually installing it, but that did not help. Any ideas?
推荐答案
我不知道这是否是解决问题的正确途径,或者它只是回避它,但我这样做
I'm not sure if this was the correct way to solve the problem, or it merely sidesteps it, but I did this
rm MyProjects/NowRedux/build.xml
android update project --target 8 --path MyProjects/NowRedux
和它的工作。它基本上创建不引用com.android.ant.SetupTask一个新的build.xml文件(这样,这个问题可能仍然被打破,但至少我找到了一个解决方法)
And it worked. It basically creates a new build.xml file that doesn't refer to com.android.ant.SetupTask (so, that problem might still be broken, but at least I found a workaround)
这篇关于的taskdef类com.android.ant.SetupTask不能使用ClassLoader AntClassLoader找到[]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!