【发布时间】:2019-10-11 14:54:22
【问题描述】:
我有一个 .pfx 文件,我曾经使用以下命令生成密钥库文件:
keytool -importkeystore -srckeystore TestCodeSign.pfx -srcstoretype pkcs12
Keytool 回来说“JKS 密钥库使用专有格式。建议迁移到行业标准格式的PKCS12..."
所以我运行了建议的命令:
keytool -importkeystore -srckeystore C:\Users\USERNAME\.keystore -destkeystore C:\Users\USERNAME\.keystore -deststoretype pkcs12
我现在有了备份副本“.old”和新的 .keystore 文件。
在 Visual Studio 中,我为我的应用的发布版本创建了一个存档。然后我单击 Distribute->Google Play,然后单击 Import 以找到 .keystore 文件。
但是当我导入时,我得到一个无用的错误。我检查了 Xamarin.Diagnostics 输出,我可以看到另一个错误:
[E:keytool]: ImportKey - System.AggregateException: One or more errors occurred. ---> Xamarin.AndroidTools.AndroidSdkToolException: Importing keystore C:\\Temp\\TestCodeSign.keystore to C:\\Users\\USERNAME\\AppData\\Local\\Xamarin\\Mono for Android\\Keystore\\A\\A.keystore...
就是这样。如何将现有 pfx 文件导入密钥库,然后使用该密钥库签署应用程序以分发到 Google Play?
【问题讨论】:
-
我认为你给它的别名不正确!
-
@FreakyAli 正确!执行 -list 后密钥库中的名称是一些随机字符串。重命名别名后,我就可以进行完整部署了!
-
太好了,我很高兴能帮上忙
标签: android xamarin google-play keytool