开发者

Build Android Library Project With Ant

开发者 https://www.devze.com 2023-03-31 23:13 出处:网络
I am having trouble building my Android library project with ant. When I try to run ant release, it s开发者_Go百科ays Target \"release\" does not exist in the project \"MyProject\".

I am having trouble building my Android library project with ant. When I try to run ant release, it s开发者_Go百科ays 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.


I had the same trouble with a target "nodeps" that was not known by Ant when building a project that was referencing a library. I added a fake target "nodeps", then I get the target "release" unknown. Wrong way.

Solution : in my referenced library directory, I run the command android update project -p . that created the build.xml compatible with Ant build.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号