getting error msg install failed missing shared li

2020-02-10 01:48发布

问题:

i have made one application which uses google maps APi,i am using titanium 1.2.2 and mobile sdk 1.5.1 for android,wenever i am trying to run the app on emulator,console shows an error

[INSTALL_FAILED_MISSING_SHARED_LIBRARY]

what does this error means and how to fix it??

回答1:

I had the same issue. Make sure you have changed the target from Android### to Google APIs in the AVD Manager.

  1. Open Android SDK Manager
  2. Select Tools -> Manage AVDs
  3. Select a/the virtual device and click edit
  4. In the target Select Google APIs...

If this target does not exist in the list, you need to install the Google APIs for the Level you require.

This will appear in the check list under the desired Level in the Android SDK Manager. Once this is installed (go grab yourself a coffee, it can take some time), repeat steps 1 - 4.



回答2:

You can add android:required="false" flag to your manifest file and the application should be able to start.

<uses-library
        android:name="com.google.android.maps"
        android:required="false"/>

Then you have to make sure to protect your code from throwing an exception in places where you need it. You can try something like this to check if library is present:

Class.forName("com.google.android.maps");


回答3:

run android.exe or android.sh utility this will bring up the program to install android SDk. Go to third party add-ons and select Google Api's. After they have been deployed/installed. Please make sure to re-start adb. If you are prompted for a restart of adb. Please say yes.



回答4:

This happens when your application requires a library that you either haven't included or your device doesn't have it.

Make sure you're using the Google API for Google Maps.



回答5:

You have to add

<uses-library android:name="com.google.android.maps" />

between the <application> </application>

Tags of the Manifest.



回答6:

The usual suggestion to ensure you are running against a Google APIs android SDK is correct.

However, there is also a bug if you are using Titanium Studio whereby updating the SDK version in Titanium does not update the SDK in the actual android AVD. You will need to open the Android SDK Manager (SDK Manager.exe or SDK Setup.exe), select "Virtual Devices" on the left and then edit all appropriate devices to set their 'Target' to the desired SDK.



回答7:

I also came across this same problem and followed @CraigS steps but it didnt help.I was working on the emulator.

Then i tried uninstalling the app from the emulator and running the project again. It installed successfully. Just try this also if CraigS method doesn't help. :)