通过JAR库替换的Andr​​oid库项目? [英] Replace Android library project by JAR library?

查看:116
本文介绍了通过JAR库替换的Andr​​oid库项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

根据这个问题:<一href=\"http://stackoverflow.com/questions/7973822/how-to-convert-an-android-library-project-to-an-external-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.

这篇关于通过JAR库替换的Andr​​oid库项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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