gpt4 book ai didi

java - keystore 被篡改或密码不正确

转载 作者:行者123 更新时间:2023-12-01 06:32:00 26 4
gpt4 key购买 nike

我知道已经有这样的问题,但我找不到任何可以帮助我的答案。

我正在尝试获取 Google Maps API key ,为此我必须使用以下命令拥有 MD5 key :

keytool -list -v -alias androiddebugkey -keystore "/Users/Sachin Parashar/.android/debug.keystore" -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 sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:780)
at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:56)
at sun.security.provider.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:225)
at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(JavaKeyStore.java:70)
at java.security.KeyStore.load(KeyStore.java:1445)
at sun.security.tools.keytool.Main.doCommands(Main.java:792)
at sun.security.tools.keytool.Main.run(Main.java:340)
at sun.security.tools.keytool.Main.main(Main.java:333)
Caused by: java.security.UnrecoverableKeyException: Password verification failed
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:778)
... 7 more

有人知道这个命令有什么问题吗?

最佳答案

读取堆栈跟踪。当您的密码错误时,就会出现此错误。

当您处理debug keystore 时,您可以将其删除并创建一个新 keystore 。

首先,删除这个文件

/Users/Sachin Parashar/.android/debug.keystore

然后,运行(在同一文件夹上,即 /Users/Sachin Parashar/.android/)

keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000

最后,您可以运行之前尝试过的内容

keytool -list -v -alias androiddebugkey -keystore "/Users/Sachin Parashar/.android/debug.keystore" -storepass android -keypass android

关于java - keystore 被篡改或密码不正确,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34511430/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com