开发者

Why not working the google map api with the different key in android?

I'm using the google map a开发者_运维技巧pi in my android application. I never a problem occurs when I use the api key that I created my computer with own fingerprint. But I change the api key the map does not appear. (appears just a blank gray field)

I don't know why not work with a different key. To release the application needs to use a different key? Waiting on your help for this topic.

<com.google.android.maps.MapView
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:enabled="true"
    android:apiKey="the api key here" />


You need a different key to release the app. When working on it yourself, use the default.keystore. Typically, for me at least, using any key besides default.keystore didn't work while I was working on Google Maps API apps.

This link should help you obtain the MD5 fingerprint and default.keystore required to sign for a Google Maps API for your development. But remember, before releasing your app, you must sign for a new API key, not using the default.keystore.


For google map api key to work you have to generate it from finger print of certificate with which you are signing your app. For example while in development stage you are signing your app with debug certificate and using api key generated using fingerprint of debug certificate present in that computer on which you are developing and when you want to release app to android market you sign app with your created cerificate instead of debug certificate and you should use fingerprint of certificate with which you have signed app to make map api key works. In short use fingerprint of that certificate with which you are signing app to generate api key.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜