Android的罐库 [英] Android Jar libraries
问题描述
你怎么安装一个项目,可能会导致可用于Android的一个jar库文件? 我要创建在所有项目中的自定义库。
很少有其他的问题:
- 是否需要与Android SDK中的一个特定版本编译的?
- 在当前的Android包编译对一个罐子图书馆里所必需的类与code工作得到与主code编译成的apk还是整个罐子得到包含?
- 在任何显着的优化和陷阱我需要了解使用一罐,而不是直接整合了code?
- 是否罐子必须签署类似的APK需要?
谷歌刚刚发布处理共享库的SDK的新版本!
的https://developer.android.com/tools/projects/projects-eclipse.html#SettingUpLibraryProject
ADT 0.9.7(2010年5月)
库项目:
ADT插件现在 支持使用库项目 发展一种能力过程中 让您存储共享的Android 应用code和资源的 独立的开发项目。您可以 然后引用库项目 从其他Android项目,并在 建造时间,这些工具编译 共享code和资源的一部分, 在相关应用程序。更多 有关此功能的信息, 在Eclipse的开发提供 与ADT文件。如果你不 在Eclipse开发,SDK工具R6 提供了相当于库 通过Ant构建项目的支持 系统中。
How do you setup a project that can result in a jar library file that can be used for android? I want to create a custom library across all projects.
Few other questions:
- Does it need to be compiled against a specific version of android sdk?
- When an android package is compiled against a jar library does the classes necessary to work with the code get compiled with main code into the apk or does the entire jar get included?
- Any notable optimizations or pitfalls I need to know about with using a jar instead of integrating the code directly?
- Does the jar have to be signed like the apk needs to?
Google just release a new version of the SDK that handles Shared Libraries!
https://developer.android.com/tools/projects/projects-eclipse.html#SettingUpLibraryProject
ADT 0.9.7 (May 2010)
Library projects:
The ADT Plugin now supports the use of library projects during development, a capability that lets you store shared Android application code and resources in a separate development project. You can then reference the library project from other Android projects and, at build time, the tools compile the shared code and resources as part of the dependent applications. More information about this feature is available in the Developing in Eclipse with ADT document. If you are not developing in Eclipse, SDK Tools r6 provides the equivalent library project support through the Ant build system.
这篇关于Android的罐库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!