开发者

Creating and using an android library project

My goal is to have a library project that contains a common set of code, layouts, assets, and other external libraries (for advertising, etc) and then create two separate android apps that use that code, but just swap out some of th开发者_运维问答e constants and layout graphics.

I started with what is described here: http://developer.android.com/guide/developing/projects/projects-eclipse.html

The library project is essentially a completely working app on its own, save for the "Is Library" checkbox.

But when I build the app's project, I get an error saying its looking for the library's APK on the device.

I then changed the "activity" nodes in the app's manifest to , but then I get "INSTALL_FAILED_MISSING_SHARED_LIBRARY" from the device.


You may get this by defining the project as a "required project" in the "Java Build Path" rather than a "reference" in the "Android" section of project/properties. In that case the project will compile, but fail at runtime as you describe.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜