keytool -exportcert -list -v \
-alias goworkkey -keystore /home/ryan/Desktop/keystore.jks
这是我的结果:
keytool error: java.lang.Exception:
Only one command is allowed: both -exportcert and -list were specified.
如果我尝试这样做:
sudo keytool -list -v -keystore /home/ryan/Desktop/keystore.jks -alias googlekey -storepass android -keypass android
我明白了:
keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect
java.io.IOException: Keystore was tampered with, or password was incorrect
at java.base/sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:780)
at java.base/sun.security.util.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:222)
at java.base/java.security.KeyStore.load(KeyStore.java:1479)
at java.base/java.security.KeyStore.getInstance(KeyStore.java:1807)
at java.base/java.security.KeyStore.getInstance(KeyStore.java:1687)
at java.base/sun.security.tools.keytool.Main.doCommands(Main.java:908)
at java.base/sun.security.tools.keytool.Main.run(Main.java:397)
at java.base/sun.security.tools.keytool.Main.main(Main.java:390)
Caused by: java.security.UnrecoverableKeyException: Password verification failed
at java.base/sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:778)
... 7 more
答案 0 :(得分:1)
我在运行命令时遇到了同样的问题:
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore -list -v -storepass android
如果我将其更改为此:
keytool -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore
已正确要求我输入密码,如此处的说明https://developers.google.com/android/guides/client-auth 一切都很好。
答案 1 :(得分:0)
您还有问题吗? youtube video进入“ Gradle项目”标签(在右侧)-> 任务-> android ->双击单击 signingReport ,您将获得所有变体的版本:以具有Variant和Config类型debug的SHA1
希望对您有用!
答案 2 :(得分:0)