JDK 7 changes keytool output

后端 未结 4 1206
不思量自难忘°
不思量自难忘° 2020-12-10 08:21

I\'m using keytool of JDK to generate the Google Maps API key fingerprint. While being rejected for several times, I realized that I\'ve upgraded JDK to 1.7 recently. So I s

4条回答
  •  心在旅途
    2020-12-10 08:56

    To elaborate on the accepted answer:

    With JDK 1.7 I was having Authorization failure issues. I finally figured out how to generate the right debug keystore, using SHA1. Here's the command I used:

    keytool -genkey -v -keyalg RSA -sigalg SHA1withRSA -keystore "%USERPROFILE%\.android\debug.keystore" -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"
    

    After generating it, you can see it by using the command:

    keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
    

    The Signature algorithm should now read "SHA1withRSA". Copy the SHA1 fingerprint and paste it in the Google console "Key for Android apps", and you should be good to go.

提交回复
热议问题