0

我真的很想在我的应用程序中实现触摸列表小部件,此处提供:

https://github.com/commonsguy/cwac-touchlist

所以我下载了它并在Eclipse中导入了项目文件夹;我尝试作为 ant 构建运行,但出现此错误:

Buildfile: C:\commonsguy-cwac-touchlist-af26192\build.xml

BUILD FAILED
C:\commonsguy-cwac-touchlist-af26192\build.xml:49: taskdef class com.android.ant.SetupTask cannot be found
 using the classloader AntClassLoader[]

Total time: 328 milliseconds

到目前为止我所做的有什么问题?它快把我逼疯了……

4

1 回答 1

1

您必须右键单击您的项目并选择属性。在打开的对话框中,从左侧选择 Android,然后在 Library 部分中选择 Add 并添加 cwac-touchlist 项目。

这是因为 cwac-touchlist 已转换为 Android 库项目,因此您必须将其作为库添加到您自己的项目中。

于 2011-09-18T17:07:10.763 回答