سؤال

Made a android app but not supportable in tablet.It uses Google APIs [Android 2.2] and has a lot of map and GPS things.It worked well in phones but When I run the app in tablet, it says

Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY

my manifest file has:

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="8" />

<supports-screens
    android:anyDensity="true"
    android:largeScreens="true"
    android:normalScreens="true"
    android:resizeable="true"
    android:smallScreens="true"
     />

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.GET_TASKS" />

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name" >
    <uses-library android:name="com.google.android.maps" />

    <activity ..........

Also made

res/layout
res/layout-land
res/layout-large

I think the <uses-library /> is causing problem.Writing <uses-library android:name="com.google.android.maps" android:required="false /> will not solve my case because Google map is necessary whether it is phone or tablet.

Any Suggestions ?
Thanks !

هل كانت مفيدة؟

المحلول

To get past INSTALL_FAILED_MISSING_SHARED_LIBRARY error with Google Maps for Android:

1) Install Google map APIs. This can be done in Eclispe 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 in Eclipse Windows/Android SDK and AVD Manager -> New... -> (Name: new_avd_X, Target: Google APIs (Google Inc.) - API Level X)

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.

5) Run Project as Android Application.

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

نصائح أخرى

Try this:

Right click your project > Properties > Android > Check Google API not Android with the equivalent api level you are using

I think your problem is because the tablet when you want test haven't google maps libraries, some tablets not support maps applications because don't have GPS, and the fabricant not incorporate google maps libraries; is something not functional in the product.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top