Martin
Martin

Reputation: 223

Deployed app shows Google Maps only in gray

I have been writing an app which shows some Polylines in a fragment via the Google Maps V2 API. on the Emulator and while Debugging via Android Studio everything works fine. Now i wanted to do a Alpha Test via the Google Play Store, everythign worked but the maps show gray.

As far as i found out till know i could be something with my API key, but i don't know what it is because it works fine while running and debugging it on my laptop. Do you guys have any ideas what there could be wrong or maybe a sollution ?

Upvotes: 0

Views: 499

Answers (1)

Uday Ramjiyani
Uday Ramjiyani

Reputation: 1447

There are two certificates, Debug and Release. you have to use release one while you generate a release build

you can refer this https://developers.google.com/maps/documentation/android-api/signup

Getting the certificate information yourself

If you didn't follow the getting started guide when creating your app, you need to get the SHA-1 fingerprint for your certificate yourself. First ensure that you are using the right certificate. You may have two certificates:

A debug certificate: The Android SDK tools generate this certificate automatically when you do a debug build. Only use this certificate with apps that you're testing. Do not attempt to publish an app that's signed with a debug certificate. The debug certificate is described in more detail in Signing in Debug Mode in the Android Developer Documentation.

A release certificate: The Android SDK tools generate this certificate when you do a release build. You can also generate this certificate using the keytool program. Use this certificate when you are ready to release your app to the world.

Displaying the release certificate fingerprint

Locate your release certificate keystore file. There is no default location or name for the release keystore. If you don't specify one when you build your app for release, the build will leave your .apk unsigned, and you'll have to sign it before you can publish it. For the release certificate, you also need the certificate's alias and the passwords for the keystore and the certificate. You can list the aliases for all the keys in a keystore by entering:

      keytool -list -keystore your_keystore_name

Replace your_keystore_name with the fully-qualified path and name of the keystore, including the .keystore extension. You'll be prompted for the keystore's password. Then keytool displays all the aliases in the keystore. Enter the following at a terminal or command prompt:

      keytool -list -v -keystore your_keystore_name -alias your_alias_name

Replace your_keystore_name with the fully-qualified path and name of the keystore, including the .keystore extension. Replace your_alias_name with the alias that you assigned to the certificate when you created it.

You should see output similar to this:

    Alias name: <alias_name>
    Creation date: Feb 02, 2013
    Entry type: PrivateKeyEntry
    Certificate chain length: 1
    Certificate[1]:
    Owner: CN=Android Debug, O=Android, C=US
    Issuer: CN=Android Debug, O=Android, C=US
    Serial number: 4cc9b300
    Valid from: Mon Feb 02 08:01:04 UTC 2013 until: Mon Feb 02 18:05:04 PST 
    2033

    Certificate fingerprints:
    MD5:  AE:9F:95:D0:A6:86:89:BC:A8:70:BA:34:FF:6B:AC:F9
    SHA1: BB:0D:AC:74:D3:21:E1:43:67:71:9B:62:90:AF:A1:66:6E:44:5D:75
    Signature algorithm name: SHA1withRSA
    Version: 3

The line that begins with SHA1 contains the certificate's SHA-1 fingerprint. The fingerprint is the sequence of 20 two-digit hexadecimal numbers separated by colons.

Upvotes: 4

Related Questions