You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

执行flutter build appbundle时build.gradle第57行signingConfigs报错

你的SigningConfigs配置可能存在这些问题
  • 未正确加载keystoreProperties配置文件
    你的代码直接使用了keystoreProperties,但如果没有在build.gradle开头添加加载key.properties的逻辑,所有属性值都会是null,导致签名配置完全无效。必须确保有这段加载代码:

    def keystoreProperties = new Properties()
    def keystorePropertiesFile = rootProject.file('key.properties')
    if (keystorePropertiesFile.exists()) {
        keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
    }
    
  • storeFile空值处理存在风险
    你配置了storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null,如果key.properties里的storeFile未配置或路径错误,会导致storeFile为null。Release版本签名必须依赖有效的密钥库文件,不能为null,这会直接触发打包失败。

  • 密钥库文件路径或属性值错误
    检查key.properties里的配置:

    • storeFile的相对路径要确认是相对于项目根目录还是app模块目录,文件名和后缀(比如.jks/.keystore)是否正确
    • keyAlias、keyPassword、storePassword是否存在拼写错误,这些属性是大小写敏感的
  • 密钥库本身的问题
    如果以上配置都没问题,可能是密钥库文件损坏,或者密码/别名与实际不符。可以用keytool命令验证:

    keytool -list -v -keystore 你的密钥库路径
    

内容的提问来源于stack exchange,提问作者Mahender Kumar

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.05 21:15:33