93

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?

Chris Morgan
  • 86,207
  • 24
  • 208
  • 215
Brijesh Patel
  • 2,901
  • 15
  • 50
  • 73

15 Answers15

94

To get past INSTALL_FAILED_MISSING_SHARED_LIBRARY error with Google Maps for Android:

  1. Install Google map APIs. This can be done in Eclipse Windows/Android SDK and AVD Manager -> Available Packages -> Third Party Add-ons -> Google Inc. -> Google APIs by Google Inc., Android API X

  2. From command line create new AVD. This can be done by listing targets (android list targets), then android create avd -n new_avd_api_233 -t "Google Inc.:Google APIs:X"

  3. Then create AVD (Android Virtual Device) in Eclipse Windows/Android SDK and AVD Manager -> New... -> (Name: new_avd_X, Target: Google APIs (Google Inc.) - API Level X)

    IMPORTANT : You must create your AVD with Target as Google APIs (Google Inc.) otherwise it will again failed.

  4. Create Android Project in Eclipse File/New/Android Project and select Google APIs Build Target.

  5. add <uses-library android:name="com.google.android.maps" /> between <application> </application> tags.

  6. Run Project as Android Application.

If error persists, then you still have problems, if it works, then this error is forever behind you.

Trenton
  • 11,678
  • 10
  • 56
  • 60
Mirco Mage
  • 1,006
  • 8
  • 2
  • 22
    Could someone please explain how running the app successfully on a Google API-enabled emulator will solve the problem of the library missing on the _real_ device? I fail to see the connection. – mcmlxxxvi Feb 24 '13 at 12:14
  • I am getting this error for com.google.android.gms.auth ... the above steps dont seem valid for this error – sheetal_158 Apr 06 '13 at 17:26
  • There are not libraries or such missing in my case. All require are installed. Yet I am having an issue installing .apk app into emulator. It fails with unknown installation error. What could be this whole issue... ? – bonCodigo Sep 05 '14 at 09:13
  • @bonCodigo Do you got any solution ?I am getting the same problem. – Anu Nov 12 '14 at 06:34
  • 4
    This answer actually is useless. Only for a AVD. – Siddharth Nov 29 '14 at 02:36
34

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" />

Scotch Design
  • 1,016
  • 9
  • 10
32
<uses-library
            android:name="com.google.android.maps"
            android:required="false" />

if required is true, maybe you need to change

semih
  • 821
  • 8
  • 16
8

You can solve it be running on Google API emulator.

To run on Google API emulator, open your Android SDK & AVD Manager > Available packages > Google Repos > select those Google API levels that you need to test on.

After installing them, add them as virtual device and run.

samwize
  • 25,675
  • 15
  • 141
  • 186
5
  1. Open eclipse
  2. Goto:

    project>Properties>Android> select: google APIs Android 4.0.3

  3. Click Icon:

    Android Virtual Device Manager>Edit> Slect box in Tabget>Google APIs APIsLevel15
    and select Built-in: is WQVGA400 > Edit AVD > Start

Prasad Jadhav
  • 5,090
  • 16
  • 62
  • 80
Mr Douangkeo
  • 51
  • 1
  • 1
5

//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.

Vivek Kumar
  • 405
  • 5
  • 15
3

I got this same error when installing to an actual device. More information and a solution to loading the missing libraries to the device can be found at the following site:

Fixing the INSTALL_FAILED_MISSING_SHARED_LIBRARY Error

To set this up correctly, there are 2 key files that need to be copied to the system:

com.google.android.maps.xml

com.google.android.maps.jar

These files are located in the any of these google app packs:

http://android.d3xt3...0120-signed.zip

http://goo-inside.me...0120-signed.zip

http://android.local...0120-signed.zip

These links no longer work, but you can find the files in the android sdk if you have Google Maps API v1

After unzipping any of these files, you want to copy the files to your system, like-ah-so:

adb remount

adb push system/etc/permissions/com.google.android.maps.xml /system/etc/permissions

adb push system/framework/com.google.android.maps.jar /system/framework

adb reboot
ThomasThiebaud
  • 11,331
  • 6
  • 54
  • 77
todd
  • 1,266
  • 1
  • 13
  • 20
3

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.

Vijay
  • 1,163
  • 8
  • 22
2

I am developing an app to version 2.2, API version would in the 8th ... had the same error and the error told me it was to google maps API, all we did was change my ADV for my project API 2.2 and also for the API.

This worked for me and found the library API needed.

djose90
  • 718
  • 5
  • 10
  • thank for your ans. but i want to run in 4.4.4 device. so which api want to of google maps. please ans me for that – tej shah May 02 '15 at 10:13
2

I received an error INSTALL_FAILED_MISSING_SHARED_LIBRARY when I run the Datalogic Application using Android Mobile.

The Manifest file has

<uses-library android:name="com.datalogic.device"
        android:required="true" />

So, I solved the error using false value of android:required="true"

When you get this type of error that's why your device is not compatible with the execution. Need to check what type of app SDK you are using and what is the device requirement.

anal soni
  • 21
  • 2
1

When I try these solutions.
I solved with:
create a new virtual device( select Google APIs(Google Inc)-API Level 15 replace android 4.0.3-APILevel 15 ) then run again. It solved.

I think it's just because the device have no google apis~

IDE:android-studio OS:ubuntu 12.04

Alps1992
  • 97
  • 9
1

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.

Fenix
  • 2,271
  • 1
  • 16
  • 24
1

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.

RJnr
  • 670
  • 6
  • 19
1

This happens when you are trying to run application on emulator. Emulator does not have shared google maps library.

k4dima
  • 6,070
  • 5
  • 41
  • 39
0

Another way to solve this problem is to install the missing libs that you need.

You can download the libs and see how to install here.

Soup
  • 1,699
  • 15
  • 30
Sergeenho
  • 339
  • 3
  • 7