Kwenk
Kwenk

Reputation: 123

Missing shared Library for Android app

What do I have to do to include an external library to my Android application?

I know, it's similar to a problem what I found here very often, but I don't want to use Google Maps API, I want to use another library, in this case it's apache commons.

I followed every step and compared them to different manuals or tutorials:

  1. I imported 'commons-lang-2.4jar' to the libs-folder in my project,
  2. I added this 'commons-lang-2.4jar' to the Referenced Libraries,
  3. I added the use to the manifest-file:

<uses-library android:name="org.apache.commons.lang"/>

But I get these popular errors:

Console:
[2011-09-23 10:53:41 - TestProject] Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
[2011-09-23 10:53:41 - TestProject] Please check logcat output for more details.
[2011-09-23 10:53:41 - TestProject] Launch canceled!

LogCat:
09-23 08:53:39.904: ERROR/PackageManager(71): Package test.project requires unavailable shared library org.apache.commons.lang; failing!

In case of the problem with Google Maps API I know my emulator needs the API, so I would guess my emulator now needs this library? But no device would have it - so I need to include it?! (tried to check this library in properties "order and export" via eclipse, but no success)

Upvotes: 0

Views: 1463

Answers (1)

Mike dg
Mike dg

Reputation: 4658

Remove <uses-library android:name="org.apache.commons.lang"/>

This is only for Android Project Libraries not a plain old Jar file. Jar files will have their classes extracted and put into your apk by just including them in the build path.

Upvotes: 1

Related Questions