构建Android图书馆项目使用Ant [英] Build Android Library Project With Ant

查看:120
本文介绍了构建Android图书馆项目使用Ant的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

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


解决方案

  

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


正确的。


  

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


也是正确的。


  

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


您通常不建立一个Android库项目。您构建引用了Android库项目等项目。创建引用该库项目工程,为使用Ant的,是覆盖在<一个href=\"http://developer.android.com/guide/developing/projects/projects-cmdline.html#ReferencingLibraryProject\">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.

这篇关于构建Android图书馆项目使用Ant的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆