图书馆项目并在清单文件合并?并在、清单、图书馆、文件合并

2023-09-12 06:23:09 作者:白衣素镐几尺

我想创建一个核心应用程序库(所有的逻辑库项目),一个免费版本)和一个完整的版本,使用该库。

I am thinking of creating a core application library (a library project with all the logic), a free version)and a full version that use this library.

据我了解一些事情的清单不喜欢的权限和活动融合了下来,确实版本code合并?莫非我把一个单一版本code在图书馆同时适用于免费和付费版本?

As I understand some things in the manifest do not merge down like permissions and activities, does the version code merge? Could I put a single version code in the library to apply to both the free and paid versions?

第二个问题,我目前的应用程序(一个我会变成一个Android库)依赖于库,因此,如果我让一个库,据我所知,你不能有从库库继承。我该如何解决这个问题?

The second question is, my current application (The one I will turn into an Android library) depends on a library, therefore if I make it a library, as I understand it, you cannot have a library inherit from a library. How do I get around this?

推荐答案

这个答案是正确的为Android SDK的早期版本,但现在已经过时。 查阅海耶斯的回答以下更多UP最新资讯

THIS ANSWER WAS CORRECT FOR EARLIER VERSIONS OF THE ANDROID SDK BUT IS NOW OBSOLETE. SEE Hayes's ANSWER BELOW FOR MORE UP-TO-DATE INFO.

几乎完全不使用的清单文件库项目。只有一部分是必要的是一个包属性manifest元素。我相信清单的休息库项目将被忽略。

The manifest file for a library project is almost totally not used. The only part that's necessary is the manifest element with a package attribute. I believe the rest of the manifest for a library project is ignored.

在公布的2010年9月就支持库项目引用库项目的机器人工具。该文档另有规定的,但我pretty的肯定,他们是外的日期。

The android tools released in Sept 2010 do support a library project referencing a library project. The docs state otherwise, but I'm pretty sure they are out-of-date.