首页 > 解决方案 > 在更新我的应用程序时,您的 Android App Bundle 使用错误的密钥签名错误

问题描述

我只是不太明白为什么会发生这种情况。我按照https://flutter.dev/docs/deployment/android中的所有步骤上传了我的第一个版本。其中有问题。所以我创建了另一个(一种以前的备份项目)flutter项目并将其修改为现有的。我更改了最初是别的东西的com.flutterappstareawayvrsn1。

我放了钥匙,它仍然显示错误:

您的 Android App Bundle 使用错误的密钥进行签名。确保您的 App Bundle 使用正确的签名密钥进行签名,然后重试::********************

你如何解决这个问题?

标签: flutterkey

解决方案


我发现我做错了什么。按照https://flutter.dev/docs/deployment/android中的说明

原始代码是:

  buildTypes {
       release {
           // TODO: Add your own signing config for the release build.
           // Signing with the debug keys for now,
           // so `flutter run --release` works.
           signingConfig signingConfigs.debug
       }
   }

修改后的代码是:

使用签名配置信息:

content_copy


    signingConfigs {
           release {
               keyAlias keystoreProperties['keyAlias']
               keyPassword keystoreProperties['keyPassword']
               storeFile keystoreProperties['storeFile'] ? 

file(keystoreProperties['storeFile']) : null


              storePassword keystoreProperties['storePassword']
           }
       }
       buildTypes {
           release {
               signingConfig signingConfigs.release
           }
       }

    But I didnt modify buildtypes
    {
    ..
    .}

I took it for granted and kept it in debug rather than release

推荐阅读