Google map reporting invalid key in Android

∥☆過路亽.° 提交于 2019-12-01 13:37:11

First for the development generate a SHA-1 from debug.keystore: Navigate to C:\Program Files\Java\jdk1.6.0\bin>..... where your bin located then execute below command

 C:\Program Files\Java\jdk1.6.0\bin>keytool -v -list -alias androiddebugkey -keystore "D
:debug.keystore" -storepass android -keypass android
 or
 C:\Program Files\Java\jdk1.6.0\bin>keytool -v -list -alias androiddebugkey -keystore "C:\Documents and Settings\user1\.android\debug.keystore" -storepass android -keypass android

Now, you can get one SHA-1 certificate and generate API key from Google API console. Add this key into your manifest.xml file. remember this API key only for the development. Using this key built apk u can not publish into market.

Now, turn to make your own keystore: execute below command

C:\Program Files\Java\jdk1.6.0\bin>keytool -genkey -v -keystore OWN.keystor
e -alias ALIASNAME -keyalg RSA -keysize 2048 -validity 300000

and give all the required details for this keystore. Now time to generate SHA-1 from your OWN.keystore execute below commnad

C:\Program Files\Java\jdk1.6.0\bin>keytool -v -list -alias ALIASNAME -keystore "C:\Program Files\Java\jdk1.6.0\bin\OWN.keystore" -storepass PASSWORD -keypass KEYPASSWORD

Now, you can get one SHA-1 certificate and generate API key from Google API console. Replace this key into your manifest.xml file. Now your app is ready to publish into market.

This may helpful to you.

Have you tried to completely remove the application and then install it all over again. This key might be got cached and even if you install the application with new key.

So before you install your application with the new key, try to remove the application completely from the phone.

You can as well go over this blog post I wrote and make sure you do all the steps right in producing the key:

Google Maps API V2 Key

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!