提问者:小点点

flutter:签署应用程序问题,在key.properties抛出异常时添加以前使用Xamarin开发的应用程序的V.1版本的密钥存储库


绑定在Play Store上部署当前应用程序的新版本。

我使用了旧的.keystore文件来签名以前的应用程序,当我试图在android文件夹下的key.properties文件上添加元数据时,我遇到了以下异常

key.properties文件内容:

storePassword=xxx
keyPassword=xxx
keyAlias=key
storeFile=C:/Users/Nike/**key.keystore**

失败:生成失败,出现异常。

* What went wrong:
Execution failed for task ':app:packageReleaseBundle'.
> java.util.concurrent.ExecutionException: java.lang.RuntimeException: jarsigner.exefailed with exit code 1 :
  jarsigner: Certificate chain not found for: key.  key must reference a valid KeyStore key entry containing a private key and corresponding public key certificate chain.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

在前面的其他应用程序分发中,我生成了一个key.jks文件,并且分发成功。

但这款应用已经在Play Store上使用Xamarin开发了第一个版本,现在使用Flutter开发的新版本需要之前的证书才能签名。


共1个答案

匿名用户

出现问题是因为KeyAlias=Key不正确。

> C:\Program Files\Java\jdk1.8.0_181\bin>keytool -v -list -keystore C:\Users\Nike\keyname.keystore

在Java钥匙工具位置下。找到了KeyName.KeyStore的别名。

storePassword=xxx
keyPassword=xxx
keyAlias=newAliasName
storeFile=C:/Users/Nike/**key.keystore**

flutter cleanflutter build appbundle创建应用程序包