6

I'm trying to use Android Maps, following the instructions in Hello MapView.

I've added <uses-library android:name="com.google.android.maps" /> in the Manifest, and I'm building against the 'Google APIs' target, which claims to be API version 7.

So I don't think I'm doing anything obviously wrong, but the project refuses to build with this error:

[2010-12-22 13:34:32 - FMS]Installing FMS.apk...
[2010-12-22 13:35:01 - FMS]Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
[2010-12-22 13:35:01 - FMS]Please check logcat output for more details.
[2010-12-22 13:35:01 - FMS]Launch canceled!

logcat is telling me the following (not very enlightening):

D/PackageParser(   55): Scanning package: /data/app/vmdl67147.tmp
I/PackageParser(   55): com.android.fms: compat added android.permission.WRITE_EXTERNAL_STORAGE android.permission.READ_PHONE_STATE
E/PackageManager(   55): Package com.android.fms requires unavailable shared library com.google.android.maps; failing!
W/PackageManager(   55): Package couldn't be installed in /data/app/com.android.fms.apk
D/AndroidRuntime(  206): Shutting down VM

It is possible I haven't set up the Maps API key correctly - when I got it using keytools, I didn't specify an alias_name, though this didn't seem to cause an error.

Can anyone help?

AP257
  • 89,519
  • 86
  • 202
  • 261

2 Answers2

20

This error arises from the fact that Google Maps not installed on your device/emulator.

Find another device (or install Google Maps on your device) or create AVD for emulator with Google Maps.

Sergey Glotov
  • 20,200
  • 11
  • 84
  • 98
  • Ah - I hadn't seen this section: http://code.google.com/android/add-ons/google-apis/maps-overview.html#avdsetup – AP257 Dec 22 '10 at 13:53
1

Make sure that your project is set up to target API level 3 (android create project -t 3 ...), and that the AVD you are testing with is also set for API level 3 (or you are testing on an actual device with Google Maps on it).

Vladimir Ivanov
  • 42,730
  • 18
  • 77
  • 103