问题描述
我正在尝试使用以下命令在macos sierra上找到我的签名密钥库的SHA1哈希:
I'm trying to find the SHA1 hash of my signature key store on macos sierra using the following comand:
keytool -exportcert -alias androiddebugkey -keystore $HOME/.android/debug.keystore -list -v -storepass android
结果如下所示:
据我所知,该命令正在运行,它不是文件的问题,也不是密码,在我看来java中的一个内部错误,是否缺少一些java包?我正在使用Java SDK 9.0.1
As far as I can see the command is working, it is not a problem with the file nor with password, it seems to me an internal error in java, is it missing some java package? I am using Java SDK 9.0.1
推荐答案
我发现问题来自 JDK8.151 和 JDK9
。默认情况下 keytool
使用系统默认语言,这似乎在某些语言上不再正常工作(在我的情况下是法语)。
I found that the problem comes from latest version of Keytool in JDK8.151
and JDK9
. By default keytool
use system default language and that seems to do not properly work anymore on some languages (in my case French).
使用参数 -J-Duser.language = en
所以请尝试使用此命令行:
So try using this command line instead:
keytool -J-Duser.language=en -exportcert -alias androiddebugkey -keystore $HOME/.android/debug.keystore -list -v -storepass android
另请参阅我的答案:
这篇关于我在使用keytool获取SHA1证书时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!