khoiNN
khoiNN

Reputation: 45

Google Map V2 on Android Emulator

When Implement Google Map API, I got blank screen and these logs :

Failed to find provider info for com.google.android.gsf.gservices

Failed to find provider info for com.google.settings

I think I have problem with my key. Because when I change the key. I still got the same log above. I got my key with SHA1. This is my manifest

  <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.mapdemo"
    android:versionCode="1"
    android:versionName="1.0" >

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

    <permission
        android:name="com.example.mapdemo.permission.MAPS_RECEIVE"
        android:protectionLevel="signature" />

    <uses-permission android:name="com.example.mapdemo.permission.MAPS_RECEIVE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

    <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.example.mapdemo.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <meta-data
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="abcdef"/>
    </application>

     </manifest>

This is my logs :

05-10 15:57:00.460: E/ActivityThread(1168): Failed to find provider info for com.google.settings
05-10 15:57:00.480: E/ActivityThread(1168): Failed to find provider info for com.google.settings
05-10 15:57:00.670: D/dalvikvm(1168): GC_CONCURRENT freed 300K, 3% free 11260K/11591K, paused 80ms+4ms, total 145ms
05-10 15:57:00.670: D/dalvikvm(1168): WAIT_FOR_CONCURRENT_GC blocked 13ms
05-10 15:57:00.780: E/ActivityThread(1168): Failed to find provider info for com.google.android.gsf.gservices
05-10 15:57:00.790: E/ActivityThread(1168): Failed to find provider info for com.google.android.gsf.gservices

Upvotes: 3

Views: 5470

Answers (4)

Dan Devine
Dan Devine

Reputation: 877

Yes, it's possible. I installed, verified and posted this msg within 15-minutes.

See duplicate question here: Running Google Maps v2 on the Android emulator

After installation, Google Maps v2 was correctly working on my emulator image. One slight wrinkle that I discovered (perhaps non-issue) was that running an emulator image with Google APIs returned "Failed: Already Installed" when attempting to install the two required APKs. Selecting the same SDK version, without Google APIs, and then manually installing the two required APKs succeeded and the Maps were visible.

Happy Mapping.

Upvotes: 2

Tayyaba Jan
Tayyaba Jan

Reputation: 21

in this case check your play services manifest file and check the version code for apk file com.google.android.gms. in the below it is "3136110" .download these apk files and install from dos prompt but before installation run your target emulator.

 package="com.google.android.gms"
android:versionCode="3136110"
android:versionName="3.1.36 (673201-10)

i am giving a link http://ge.tt/9x9n4lg from which i got these apk files,hope it will help you

Upvotes: 0

Mohit Rakhra
Mohit Rakhra

Reputation: 165

At the moment, referencing the Google Android Map Api v2 you can't run google maps v2 on Android emulator; you must use a device for your tests.

but if you do not have the real testing device or phone you can do this below

You need to try on an emulator with the Google API's version. Each Platform has two versions Android and Android+Google APIs.

Ensure that when you create the AVD, you select on target field the Google APIs version.

And this can be also helpful: http://developer.android.com/google/play-services/setup.html#ensure

Following are the steps that I am listing below to enable Google Maps on your android

Create a new emulator

  • for device choose "5.1'' WVGA (480 x 800: mdpi)
  • for target choose "Android 4.1.2 - API level 16
  • for "CPU/ABI" choose ARM
  • leave rest to defaults

these are the settings that are working for me. I don't know for different ones.

Start the emulator

install com.android.vending-1.apk and com.google.android.gms-1.apk via ADB install command

Google Maps should work now in your emulator. Please comment is it working for you?

Upvotes: 0

CommonsWare
CommonsWare

Reputation: 1006549

Google Map V2 on Android Emulator

Maps V2 is not supported on emulators at the present time.

Upvotes: 4

Related Questions