开发者

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:debug开发者_JAVA百科gable 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 ?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜