keytool 错误:java.lang.Exception:别名 <上传> 不存在

use*_*300 7 android app-store google-play-services react-native

I registered for the Google Play app signing capabilities and am having an issue trying to generate the upload key.

I followed the section under: Generate a key and keystore in this article, https://developer.android.com/studio/publish/app-signing. I was able to generate the .jks file.

After this step, things get really confusing as I was unable to find doc. that explains how to generate and use the upload key. I ended up finding this article that provides a keytool command to generate the upload key, How do I make a signed apk with upload key?.

The issue occurs when I try to run that command I keep getting this error message: java.lang.Exception: Alias does not exist. The weird thing is that the .pem file seems to get generated even though I am getting this error.

如何解决此问题以避免出现此错误?这是一个有效的 .pem 文件,因为我一直收到这个错误?

小智 15

将“上传”替换为您正确的别名,例如 key0。例如

keytool -export -rfc -alias key0 -file upload_certificate.pem -keystore keystore.jks
Run Code Online (Sandbox Code Playgroud)


Har*_*aru 2

我遇到了同样的问题,但就我而言,这只是复制粘贴的愚蠢错误。我创建了具有不同别名的密钥,并在终端命令中传递了不同的别名。

因此,如果您要复制支持团队在电子邮件中提供的命令,您应该使用您的别名,而不是“上传”。

希望这能解决您的问题。