1

I've been developing my first android app using Google Maps SDK.

It work perfectly fine when i Run the application with Android Studio using my Samsung Galaxy S4. I can see maps, everything is good.

Now today, i released, and i testet it on my friends Samsung Galaxy s4. It did not show any maps. What a nightmare. What must i do? What information do i need to provide so someone can help me out?

Edit:

I signed my apk with android studio. It create some .jks file.

Here is my manifest:

<?xml version="1.0" encoding="utf-8"?>

<permission
    android:name="de.christianbergau.gojogging.permission.MAPS_RECEIVE"
    android:protectionLevel="signature" />

<uses-permission android:name="de.christianbergau.gojogging.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<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-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

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

<application
    android:debuggable="false"
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />
    <meta-data
        android:name="com.google.android.maps.v2.API_KEY"
        android:value="MYAPIKEYHERE" />

    <activity
        android:name="de.christianbergau.gojogging.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>
    <activity
        android:name="de.christianbergau.gojogging.SessionsActivity"
        android:label="@string/title_activity_sessions" >
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="de.christianbergau.gojogging.MainActivity" />
    </activity>
    <activity
        android:name="de.christianbergau.gojogging.MapActivity"
        android:label="@string/title_activity_map" >
    </activity>
    <activity
        android:name="de.christianbergau.gojogging.SettingsActivity"
        android:label="@string/title_activity_settings" >
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="de.christianbergau.gojogging.MainActivity" />
    </activity>
</application>

CBergau
  • 636
  • 2
  • 10
  • 26
  • check your friend's phone for updating GooglePlayServices and Maps...it may happen that the version you are using to develop is newer than the version on the device of your friend... – Atish Agrawal Feb 23 '14 at 16:47
  • It appears to be something else. When i uninstall the application on MY phone, and install it via the Google Play Store, it also does not work :( – CBergau Feb 23 '14 at 16:57

3 Answers3

3

You were all right, this is what i did:

  • I did create an API Key with my debug.keystore SHA1 fingerprint.
  • I did create an APK file and signed it with my .jks file which android studio did create for me
  • I did deploy that APK and Maps could not be displayed

To fix it:

Get the SHA1 fingerprint of the jks file with the following command:

keytool -v -list -keystore /path/to/my.jks
  • Created new API Key on Google
  • Saved new API key to my manifest.xml
  • Upload new APK

Done

CBergau
  • 636
  • 2
  • 10
  • 26
2

When you run app with Android Studio, your app use debug.keystore. Map work because map key generated for debug.keystore. You must generate api key for your release keystore.

vmtrue
  • 1,724
  • 18
  • 36
  • That sounds valid. Gonna try that! – CBergau Feb 23 '14 at 16:58
  • This'll be the issue. You'll also need to uninstall the existing version (the one with the wrong keystore) and install the fixed version fresh. Google Play Services seems to cache Maps API keys, so installing over the top will continue to give you an empty map. In future, before you upload your apk to the Play store, you can test it on-device by installing via [adb](http://developer.android.com/tools/help/adb.html): `adb install myapk.apk` – Adam S Feb 23 '14 at 18:13
  • Note that this also means that anyone who updates your app via the Play Store will continue to not be able to see maps, until they restart their phone (I _think_ that clears the cache). – Adam S Feb 23 '14 at 18:16
  • Thats impossible because when i create a new keystore and sign my apk, google gives me an error, that some SHA1 fingerprint does not match previous fingerprint :( – CBergau Feb 23 '14 at 18:19
  • By the way: How can it be the debug.keystore as the documentation said, its impossible to publish the app with the debug.keystore? – CBergau Feb 23 '14 at 18:45
1

When you publish your app with debug key, map looks blank. Use release key for production. You can check this.

Google Map Android API v2 can't display map in play store application

Community
  • 1
  • 1
Shadow
  • 6,864
  • 6
  • 44
  • 93