构建Android图书馆项目使用Ant图书馆、项目、Android、Ant

2023-09-08 09:38:28 作者:一见钟情钟的只是脸而已

我无法建立我的Andr​​oid库项目与蚂蚁。当我尝试运行蚂蚁发布,它说目标释放没有项目MyProject的存在

然后我认为或许是库没有得到建立与发布/调试,所以我开始使用蚂蚁编译,它似乎工作。然后我手动压缩文件夹使用Java的压缩工具,并改名为.apk文件。我猜这是错误的方式做到这一点。

谁能告诉我如何使用Ant来构建一个Android库项目?

解决方案   

然后我认为或许是库没有得到建立与发布/调试

正确的。

  

我猜这是错误的方式做到这一点。

也是正确的。

  

谁能告诉我如何使用Ant来构建一个Android库项目?

您通常不建立一个Android库项目。您构建引用了Android库项目等项目。创建引用该库项目工程,为使用Ant的,是覆盖在the Android文档。关于Android库项目的作用更多的信息,也可以在发现Android文档。

I am having trouble building my Android library project with ant. When I try to run ant release, it says Target "release" does not exist in the project "MyProject".

美国移民政策 侨外美国投资移民项目贷款方为喜达屋资本集团 聚焦财经

I then assumed that perhaps libraries do not get build with release/debug, so I started using ant compile, which seems to work. I then zip the folder manually using java's zip utility and rename it to .apk. I am guessing this is the wrong way to do this.

Can anyone show me how to build an Android library project using ant?

解决方案

I then assumed that perhaps libraries do not get build with release/debug

Correct.

I am guessing this is the wrong way to do this.

Also correct.

Can anyone show me how to build an Android library project using ant?

You typically do not build an Android library project. You build other projects that reference the Android library project. Creating projects that reference the library project, for use with Ant, is covered in the Android documentation. More information about the role of Android library projects can also be found in the Android documentation.