Your Android App Bundle is signed with the wrong key. Ensure that your app bundle is signed with the correct signing key and try again

后端 未结 11 1902
清歌不尽
清歌不尽 2020-12-01 23:20

How do I sign my android app bundle with the correct signing key?

相关标签:
11条回答
  • 2020-12-01 23:53

    Read this is you have requested a new upload key from Google Play and still get this error (should for both native Android and Flutter as well).

    I had experienced the same problem. And here's out steps on how to resolve it:

    1. We've lost the upload key (initial keystore file, probably .jks) that was used to sign the app.
    2. We created a new keystore file and exported created certificate to PEM format as stated here in the docs. We sent the request to the Google Play Team to reset our key, attached .pem file.
    3. When Google Play team reset the key we've tried to use the new .jks keystore we had created in the step 2 and the error appears one more time.

    The solution is to clean your project, rebuild it from scratch to reset all the cached builds.

    In case of Flutter (we had this error building the app using Flutter). Make sure you use

    flutter clean
    

    Build the application on simulator or device.

    Then run:

    flutter build appbundle --release
    

    This is how it was solved in our case.

    PS. This should also help on native Android too.

    0 讨论(0)
  • 2020-12-02 00:01

    I had the same error when building a signed Android App Bundle.
    For debug purposes on the local maschine, I enabled debuggable in the release build type.
    It seems, Playstore recognized an debug build and simply said it is not a valid Bundle.

    build.gradle:

    buildTypes {
         release {
             minifyEnabled true
             proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
             //debuggable = true  <----- Works like expected when disabled
         }
    }
    
    0 讨论(0)
  • 2020-12-02 00:04

    For those who have released apk without a manually generated keystore and facing this issue when trying to release the apk or bundle from a different machine, follow the below steps:

    1. Copy debug.keystore (C:\Users\username\.android\debug.keystore) from the machine which used to build the first version of the App

    2. Select Build > Generate Signed Bundle/APK

    3. Provide the Key store path to the debug.keystore file

    4. Fill the other fields with the default values mentioned below and build

    Keystore name: "debug.keystore"
    Keystore password: "android"
    Key alias: "androiddebugkey"
    Key password: "android"
    CN: "CN=Android Debug,O=Android,C=US"
    
    0 讨论(0)
  • 2020-12-02 00:10

    I realized that when I upload apk it gives more detailed error. so maybe try that solve errors and maybe then try app bundle.

    hope it helps.

    0 讨论(0)
  • 2020-12-02 00:12

    I was banging my head on the table over this for about two hours. When I finally gave up and was filling out my "reset key" request, I realized that I was currently attempting to upload it to the wrong project the whole time.

    So, step one: confirm that you're attempting to upload to the correct project.

    0 讨论(0)
提交回复
热议问题