Android release keystore issue: “Keystore was tampered with, or password was incorrect”

前端 未结 4 1212
粉色の甜心
粉色の甜心 2021-01-03 04:30

A couple of months ago I generated my android release keystore with this command:

keytool -genkey -v -keystore my-release-key.keystore -alias myalias -keyalg         


        
相关标签:
4条回答
  • 2021-01-03 05:09

    The implicit keyalg, digestalg and/or sigalg has changed between different versions of Java and possibly eclipse.

    Use the command line and try a couple different combinations. This worked for me after creating the key with Java 5.0 but upgrading my system to Java 6 jarsigner -verbose -keystore <.keystore> -sigalg MD5withRSA -digestalg SHA1 <apk file> <alias>

    0 讨论(0)
  • 2021-01-03 05:09

    That message means the password is wrong. It looks like you have not remembered the password you used for the key store.

    It's strongly advised when creating a key and password to keep copies somewhere very safe, protected from forgetting, fire, drive failure etc because the consequences can be very severe (not being able to ever update the app in the Market).

    0 讨论(0)
  • 2021-01-03 05:15

    This error occurred with me because I had a comma in my Company name, for instance "Company, Inc." Removed the comma and everything worked ok. Hope that helps.

    0 讨论(0)
  • 2021-01-03 05:20

    Sharing my experience with the community...

    JDK 1.7 build.gradle for android

    android {
        compileSdkVersion 18
        buildToolsVersion "17.0.0"
    
        signingConfigs {
            release {
                storeFile file("../my-release.keystore")
                storePassword "$MakeMyDay!"
                keyAlias "my-release"
                keyPassword "$MakeMyDay!"
            }
        }
    :
    

    When I gradlew assembleRelease, I got the dreaded "tampered with or password was incorrect" error.

    Resolution:

    Use a simpler password, like abcdef. Not sure if special characters like $ and ! were supported.

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