您使用了错误的密钥库。您需要使用不同的密钥库。
在Fedora上运行以下命令后,我遇到了相同的错误:
keytool -exportcert -alias androiddebugkey -keystore androidKey -list -v
错误:
keytool error: java.lang.Exception: Alias <androiddebugkey> does not exist
java.lang.Exception: Alias <androiddebugkey> does not exist
在这种情况下我犯了错误,我使用密钥库来签署我的Android APK项目,而不是位于
/home/el/.android/debug.keystore
的
debug.keystore
:
我像这样更改它以使用正确的密钥库:
[el@rosewill .android ]$ keytool -exportcert -alias androiddebugkey -keystore /home/el/.android/debug.keystore -list -v
Enter keystore password: ******
它产生了以下输出:
Alias name: androiddebugkey
Creation date: Aug 31, 2013
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=Android Debug, O=Android, C=US
Issuer: CN=Android Debug, O=Android, C=US
Serial number: 14be2b38
Valid from: Sat Aug 31 21:43:47 EDT 2013 until: Mon Aug 24 21:43:47 EDT 2043
Certificate fingerprints:
MD5: 47:D1:3C:AD:3C:6D:49:22:26:01:6B:C8:4D:C0:37:42
SHA1: 10:96:22:A1:3C:3B:4A:14:2D:B7:5E:62:1D:D7:9B:0B:24:EE:DF:BD
SHA256: DF:BF:A9:5D:B8:AE:7D:FF:7E:E7:62:84:8F:32:9A:29:19:C6:41:82:83:FA:0B:D0:1B:59:15:AE:4D:D8:38:D1
Signature algorithm name: SHA256withRSA
Version: 3
Extensions:
SubjectKeyIdentifier [
KeyIdentifier [
0000: 1A 32 1F F0 03 E0 23 34 6F GE 78 CC E3 10 B5 61 .0....)4o.x....a
0010: 6D 6F F1 38 mo.8
]
]
以下是我所遵循的指南:
从这里开始:https://developers.google.com/+/quickstart/android
在终端中运行Keytool实用程序以获取证书的SHA-1指纹。对于debug.keystore,密码为android。
keytool -exportcert -alias androiddebugkey -keystore <path-to-debug-or-production-keystore> -list -v