Search code examples
androidgoogle-mapsgoogle-apigoogle-maps-android-api-2api-key

Google Maps is showing grey tiles after publishing the apk in Play Store


I work with Google Maps Android API v2 to show some Map Fragments in my App. Everything works until my App is published in the Play Store (I checked my exported APK before it is published and it worked just fine when sideloaded).

I have an assumption, but first the situation: I write and sign the app (Also the API Key is from my account). When the app is ready, another person (with another account in the Play Store) is publishing the App.

Is it possible that the API Key has to be generated from the same account that is publishing the App? I appreciate every hint!!!

My Manifest looks like this:

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

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

<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"/>
<permission android:name="de.example.android.permission.MAPS_RECEIVE"
            android:protectionLevel="signature"></permission> 
<uses-permission android:name="de.example.android.permission.MAPS_RECEIVE"/>    

<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-feature android:name="android.hardware.location" android:required="false"/> 
<uses-feature android:name="android.hardware.location.network" android:required="false"/>

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-feature android:name="android.hardware.location.gps" android:required="false"/>

<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/AppBaseTheme">

   <!-- GOOGLE MAPS START -->
        <meta-data 
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="..." />
   <!-- GOOGLE MAPS END -->

    <activity
        android:name="de.example.android.SplashScreen"
        android:label="@string/app_name" 
        android:screenOrientation="portrait"
         android:theme="@style/Theme.Splash">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

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

    <activity
        android:name="de.example.android.MainActivity"
        android:screenOrientation="portrait"
        android:icon="@drawable/ic_launcher_activity"
        android:theme="@style/AppBaseTheme"
        >
    </activity>

    <!-- This Activity is called from a lib  -->
    <activity
     android:name="de.example.testlib.android.MapActivity">                            
    </activity>

</application>


Solution

  • Did the person publishing the app resign the APK with some other keystore?