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 1901
清歌不尽
清歌不尽 2020-12-01 23:20

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

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

    The error suggests that you have uploaded an APK or an App Bundle previously. All the artifacts you upload to the Play Console should all be signed with the same keystore. So the error means that you signed the App Bundle with a key that is different than the ones you have uploaded previously. You have to either find that keystore you used before or reset the key by contacting Play Console support team.

    0 讨论(0)
  • 2020-12-01 23:45

    What I did was exclude my android files from git, then when I changed branch and rebuilt, my build.gradle file was overwritten.

    0 讨论(0)
  • 2020-12-01 23:46

    React Native here!

    I got this error after trying to upload the generated .aab file from the ./gradlew bundleRelease command. I fixed it by exporting the .aab file by using Android Studio again. I believe that this is the way to upload your first .aab file to Google Play anyway. In case you don't know how:

    In Android Studio:

    1. Open you React Native's project android folder
    2. Go to Build -> Generate Signed Bundle / APK
    3. Select Android App Bundle
    4. Enter your key-store details (if this is your first time doing this, you have to check the Export encrypted key checkbox, which you can use for Google Play App signing) and click Next
    5. When Android Studio finishes it gives you the option to locate the file(s) created

    Now if you upload this .aab file, it should be accepted.

    0 讨论(0)
  • 2020-12-01 23:47

    I tried using the multiple answers here & in this question, but somehow I was getting this error because I had some issues with my android/app/build.gradle and android/gradle.properties files.

    Two things you should check (in addition to the other solutions here) are:

    1. In android/gradle.properties and android/app/build.gradle, make sure your keystore variables match exactly.
      • In android/gradle.properties, you probably have something like this:
        MYAPP_RELEASE_STORE_FILE=<>
        MYAPP_RELEASE_KEY_ALIAS=<>
        MYAPP_RELEASE_STORE_PASSWORD=<>
        MYAPP_RELEASE_KEY_PASSWORD=<>
        
      • Make sure these variable names exactly match those in android/app/build.gradle:
        android {
            ...
            signingConfigs {
                release {
                    if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
                        storeFile file(MYAPP_RELEASE_STORE_FILE)
                        storePassword MYAPP_RELEASE_STORE_PASSWORD
                        keyAlias MYAPP_RELEASE_KEY_ALIAS
                        keyPassword MYAPP_RELEASE_KEY_PASSWORD
                    }
                }
            }
        }
        
    2. In android/app/build.gradle, make sure you set signingConfig to signingConfigs.release in your release buildTypes:
      android {
          ...
          buildTypes {
              debug ...
              release {
                  signingConfig signingConfigs.release
              }
          }
      }
      
    0 讨论(0)
  • 2020-12-01 23:49

    I am using expo to build my app bundle. In my case, I had to:

    1. Manually create a new keystore file.
      Or download your existing keystore using command expo fetch:android:keystore
    2. Download the Upload certificate of my app from Google Play Console
    3. Import the Upload certificate of the app into the newly created keystore file, giving it a key alias and a password. This is easily done using the java keytool. In MacOS is in the path so issue a keytool -h to see the various commands available.
    4. run expo ba -c , took the manual route and when asked, I specified the keystore file I created in step 1.
    0 讨论(0)
  • 2020-12-01 23:50

    Just rebuild the project and generate signed apk once again and try !

    Wasted my 2 days on this, had my keystore key but still showed error and request google for generating new key.... Read some random stackoverflow, where it was written to rebuild the project and try uploading once again.. IT WORKED !

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