toto_tata
toto_tata

Reputation: 15392

maps working with debug API key but not with release API key...?

I have finished the development of my app which uses Google Maps. During the development/debug phase, I used a debug MD5 key and generated a debug Google Maps API key on Google website. Google Maps worked perfectly well on both emulator and device.

Now, I want to release my app. I generated a release MD5 key and a release Google Maps API key.

I copied/pasted this release API key in my xml map file:

<com.google.android.maps.MapView
    [...]
    android:apiKey="xxxxxxx"
/>

But now, when I run the app on my device, I just get a gray grid instead of a map...

I took care to put android:debuggable to false in my manifest:

<application android:icon="@drawable/icon"
                    android:label="@string/app_name"
                    android:debuggable="false"
                    android:theme="@android:style/Theme.NoTitleBar">

Do you know what I can do to solve my issue ?

Thanks !!!

[EDIT] Perhaps the problem is due to the fact that I run the app on my device in debug mode and not in release mode ? If it is the issue, how to run my app in release mode on my device ?

Upvotes: 2

Views: 3981

Answers (1)

toto_tata
toto_tata

Reputation: 15392

See njzk2's comment:

use adb to install the apk on your device/emulator (adb install app.apk). Don't forget to uninstall the debug version first, otherwise the signature difference will prevent the installation

Upvotes: 1

Related Questions