我试图生成sha使用facebook插件,我尝试使用几个教程创建,但我不能这样做,letme把错误:
C:\Program Files\Java\jdk-9.0.1\bin>keytool -list -v -keystore C:\Users\Gaston\.android\debug.keystore -alias androiddebugkey -storepass android -keypass android
Nombre de Alias: androiddebugkey
Fecha de Creación: 23 feb. 2016
Tipo de Entrada: PrivateKeyEntry
Longitud de la Cadena de Certificado: 1
Certificado[1]:
error de herramienta de claves: java.util.IllegalFormatConversionException: d != java.lang.String
java.util.IllegalFormatConversionException: d != java.lang.String
at java.base/java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4331)
at java.base/java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2846)
at java.base/java.util.Formatter$FormatSpecifier.print(Formatter.java:2800)
at java.base/java.util.Formatter.format(Formatter.java:2581)
at java.base/java.util.Formatter.format(Formatter.java:2517)
at java.base/java.lang.String.format(String.java:2747)
at java.base/sun.security.tools.keytool.Main.withWeak(Main.java:3151)
at java.base/sun.security.tools.keytool.Main.printX509Cert(Main.java:3182)
at java.base/sun.security.tools.keytool.Main.doPrintEntry(Main.java:1995)
at java.base/sun.security.tools.keytool.Main.doCommands(Main.java:1212)
at java.base/sun.security.tools.keytool.Main.run(Main.java:397)
at java.base/sun.security.tools.keytool.Main.main(Main.java:390)
答案 0 :(得分:3)
java 8和密钥工具存在问题,因此您需要强制使用该语言并且它可以正常工作:
keytool -J-Duser.language=en -exportcert -alias androiddebugkey -keystore C:\Users\Gaston/.android/debug.keystore -list -v -storepass android