Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
334 views
in Technique[技术] by (71.8m points)

android - Library Project does the manifest file merge?

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.

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?

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

AndroidManifest.xml merging is supported in version 20 of the ADT tools:

"Automatic merging of library project manifest files into the including project's manifest. Enable with the manifestmerger.enabled property."

http://tools.android.com/download/adt-20-preview

You will need version 20.0.3 or newer to get it to work within Eclipse.

Release notes for ADT 21 preview has this comment:

"Fixed manifest merger to properly adapt library classes in the merged manifest."

Not sure what this means but may be worth checking out if you are having merge issues.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...