通过JAR库替换的Andr​​oid库项目?项目、JAR、Andr、oid

由网友(空了岛退了潮)分享简介:在我的项目中,有许多库项目(超过10个)。这需要很长的时间来建立。所以,我想通过JAR库,以取代一些库项目。根据这个问题:How转换一个Android库项目到外部JAR? 由于CommonsWare的回答( http://stackoverflow.com/a/7973950/190309 )  如果你的库是纯Java...

在我的项目中,有许多库项目(超过10个)。这需要很长的时间来建立。所以,我想通过JAR库,以取代一些库项目。

根据这个问题:How转换一个Android库项目到外部JAR?

由于CommonsWare的回答( http://stackoverflow.com/a/7973950/190309 )

  

如果你的库是纯Java的code,没有资源,你可以创建  一个JAR出来的.class文件,就像你会与普通的Java。

但在使用NineOldAndroids库时( https://github.com/JakeWharton/NineOldAndroids )从杰克沃顿商学院,

  

本库是psented作为一个.jar文件,您可以在您的应用程序的库/文件夹$ P $。

这意味着虽然有很多NineOldAndroids资源,我可以把它作为一个JAR库,而不是

通过ADT 17,对于每一个库项目,存在lib_project /斌/ lib_project.jar一个JAR库,每个库项目建成时自动生成的。

我可以用这个JAR作为库项目的方法吗?

解决方案   

这意味着虽然有许多资源中NineOldAndroids

有precisely零资源NineOldAndroids。您可以通过看项目并看到讲这个没有 RES / 目录

  

通过ADT 17,对于每一个库项目,存在lib_project /斌/ lib_project.jar一个JAR库,每个库项目建成时自动生成的。

    

我可以用这个JAR作为库项目的方法吗?

不是在这个时候。这JAR仍取决于库项目本身。

In my project, there are many library project (more than 10). It takes long time to build. So I want to replace some of these library projects by JAR libraries.

According to this question: How to Convert an Android Library Project to an External JAR?

As CommonsWare's answer (http://stackoverflow.com/a/7973950/190309)

If your library is purely Java code, with no resources, you can create a JAR out of the .class files, just as you would with regular Java.

But when using NineOldAndroids library (https://github.com/JakeWharton/NineOldAndroids) from Jake Wharton,

This library is presented as a .jar file which you can include in the libs/ folder of your application.

It means although there are many resources in NineOldAndroids, I can use it as a JAR library instead.

With ADT 17, for every library project, there is a JAR library in lib_project/bin/lib_project.jar which automatically generated each time library project is built.

Can I use this JAR as an alternative for library project?

解决方案

It means although there are many resources in NineOldAndroids

There are precisely zero resources in NineOldAndroids. You can tell this by looking at the project and seeing that there is no res/ directory.

With ADT 17, for every library project, there is a JAR library in lib_project/bin/lib_project.jar which automatically generated each time library project is built.

Can I use this JAR as an alternative for library project?

Not at this time. That JAR still depends on the library project itself.

阅读全文

相关推荐

最新文章