0

I recently updated to Android Studio 3.0 and I'm having the following issue:

I have my .jks file and I'm trying to create a signed apk. I'm %100 sure that the Alias name and all passwords are correct but I'm getting an error that Keystore was tampered with, or password was incorrect.

I even tried creating a new key and that works one or two times but then I get the same message, can anyone explain what is happening here?

It seem s that this is happening as a result of the new Android Studio update - am I missing something about this update?

Chisko
  • 3,092
  • 6
  • 27
  • 45
Izak
  • 909
  • 9
  • 24

1 Answers1

0

Hey so the correct siginingConfigs would look something like this

android {
  signingConfigs {
    release {
      storeFile file("PATH/TO/YOUR/FILE/mykeystore")
      storePassword "mypassword"
      keyAlias "KeyAlias"
      keyPassword "mypassword"
    }
  }

  buildTypes {
    release {
      signingConfig signingConfigs.release
    }
  }
}

Let me know if it works

Amey
  • 242
  • 3
  • 11
  • So I looked through my whole project can't find where this `signingconfig` file is??? – Izak Apr 12 '18 at 21:55
  • The way I usually create my signed apks is by clicking in Build -> Geneate signed APK and it works perfectly never had to deal with this file you are mentioning? – Izak Apr 12 '18 at 21:56
  • This is the google's recommended way of adding the keystore to the project. I know it was working without this before But they may have made it mandatory for new gradle version. Just try adding that to the app's gradle. – Amey Apr 12 '18 at 22:08
  • signingconfig is not a file. you have a keystore file. you need to add the above code snippet to the gradle file – Amey Apr 12 '18 at 22:10
  • Didn't work I don't think thats is necessary to do. Still not working. – Izak Apr 13 '18 at 15:03