蚂蚁无法构建蚂蚁

2023-09-05 09:43:02 作者:有你、已滿足。

我有构建一个Java应用的新这是使用的ant.jar(蚂蚁1.8.2)类构建Android应用程序从它与发布为目标的build.xml文件。 我的Andr​​oid项目已建成使用Android创建项目的命令,使用SDK 2.2。 当我运行我的应用程序构建的Andr​​oid应用程序我得到以下信息 -

I have build a Java appliction which is using ant.jar (ant 1.8.2) classes for building android application from it's build.xml file with release as target. My Android project has been built by using android create project command, using sdk 2.2. When I run my application for building the Android application I get the following message -

build.xml文件:46:的taskdef类com.android.ant.SetupTask无法找到

build.xml:46: taskdef class com.android.ant.SetupTask cannot be found

我已经验证了sdk.dir路径和SDK-位置路径无一不是正确的。

I have verified the sdk.dir path and the sdk-location path and both are correct.

怎么能解决呢?

谢谢, 的Eyal。

推荐答案

你验证了com.android.ant.SetupTask类确实是你定义的sdk.dir和SDK-位置路径?

Have you verified that the com.android.ant.SetupTask class is indeed in the sdk.dir and sdk-location path that you define?

如果在Linux上,下面的命令,在这些目录的根目录下运行,可以告诉你,如果该类通过查看所有类和JAR文件中找到:

If on Linux, the following command, run at the root of those directories, can tell you if the class is found by looking in all class and JAR files:

   grep -ri "com.android.ant.SetupTask" *