I got the SHA-1 fingerprint from using the keytool for my application on my key that I sign the application with when I upload it to the play store.

But when I open the app on my phone for testing it says it is not the right key. ANy ideas what I could be doing wrong?

Not sure what more information i can give without giving security info for my app, so if you can help give me anymore information that I can not think of please let me help you help me.

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top