INSTALL_FAILED_MISSING_SHARED_LIBRARY error in Android

Viewed 202602

When I am trying to run an android application which uses Google API I get the following error

[2009-07-11 11:46:43 - FirstMapView] Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
[2009-07-11 11:46:43 - FirstMapView] Please check logcat output for more details.
[2009-07-11 11:46:44 - FirstMapView] Launch canceled!

Can anyone help me solve this error?

14 Answers

In my case, it was that the app had defaulted to a Wearable target device.

I removed the reference to Wearable in my Manifest, and the problem was solved.

<uses-library android:name="com.google.android.wearable" android:required="true" />

//Check your manifest

<uses-library
        android:name="com.google.android.wearable"
        android:required="true" />

//This was added for me while adding a new activity by mistake which was causing the problem.

This may happen due to the following reasons -

  1. In your manifest file check the "<uses", like wearable, TV, tablet, etc.
  2. there is a need for some code implementation in BUILD.GRADLE which you may have deleted mistakenly

So by removing the implementation or adding them can remove this error. You can remove the "uses" code in the android manifest file.

Examples:

  1. this wasted my 1 hour, cause I mistakenly added a class of wearable type, of course, I safe deleted that using refractor but it Didi not made changes to manifest file.

  2. I used the firebase crashlytics code in my java project but I mistakenly deleted that in buld.gradle. Here below: implementation 'com.google.firebase:firebase-crashlytics:17.1.1'

The solution is in either BUILD>GRADLE or in AndroidManifest.xml, mostly.

Usually, it means that the app is installed/debugged on the device (including virtual device) that does not support some required library (it may relate to Android version or hardware).

Check elements <uses-library> in your manifest whether all libraries are supported on the device. In my case, it was EDMK (library for Zebra barcode scanners).

Note: Google Play uses the <uses-library> elements declared in your app manifest to filter your app from devices that don't meet its library requirements.

Option a)

If the library was added accidentally (its specific classes are not used in your app), remove the element <uses-library>.

Option b)

If the library is optional, add android:required="false" into <uses-library>. You may need to add validations in your code if some part requires this library.

Option c)

If the library is required, use another device or create a virtual one (AVD) that supports the library.

instead of removing the

<uses-library android:name="com.google.android.wearable" android:required="true" //>

in permission, just set the

android:required="true" to false.

Related