Zala Janaksinh
Zala Janaksinh

Reputation: 2927

How to add the android application as a library to another android application?

i create one simple apps.here i want use the one already create apps (name : mainLabProject) in my current apps.so i make the mainLabProject as library.goto project explorer->right click the project Name-> select Properties->select android then ->select isLibrary click true and create library.

After that i add this library in my current app (name UseLabProject).so follow the same path asa baove and after click add button and add mainLabProject as library in my current Apps.

also apply the permission in my current app`s maniFest file Like.

<uses-library android:name="info.main" android:required="true" />

but when i run this apps this type error occur in conesole

2012-07-21 12:18:05 - UseLabProject] Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
[2012-07-21 12:18:05 - UseLabProject] Please check logcat output for more details.
[2012-07-21 12:18:05 - UseLabProject] Launch canceled!

and This type error in Logcat

07-21 12:18:04.172: ERROR/PackageManager(63): Package info.use requires unavailable shared library info.main.MainLabProject; failing!

so now i how to solve this problem.

i remove the permission from manifest file then got this type exception

07-21 12:56:23.885: E/AndroidRuntime(4663): java.lang.RuntimeException: Unable to start activity ComponentInfo{info.use/info.use.UseLabProject}: android.content.ActivityNotFoundException: Unable to find explicit activity class {info.use/info.main.MainLabProject}; have you declared this activity in your AndroidManifest.xml?

Upvotes: 0

Views: 135

Answers (1)

biegleux
biegleux

Reputation: 13247

You don't need to use <uses-library android:name="info.main" android:required="true" /> in your manifest. Remove it and try, if won't help try to clean your lib and project.

Upvotes: 1

Related Questions