2

When I try to build on Android Studio a signed APK-file on another computer (not on the PC on which key was generated), the error is occurs:

Information:Gradle tasks [:app:assembleRelease]
:app:preBuild UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
:app:checkReleaseManifest
:app:preDebugBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
......
:app:prepareComGoogleAndroidGmsPlayServicesWearable810Library UP-TO-DATE
:app:prepareReleaseDependencies
:app:packageRelease FAILED
Error:Execution failed for task ':app:packageRelease'. Failed to read key         SkidkaRu from store "C:\Users\elena\keyappskidkaru.jks": Keystore was tampered   with, or password was incorrect

When, I opened a Terminal window and typed in the following:

keytool -storepasswd -new [inserted password] -keystore [inserted file name]

keytool -keypasswd -alias [inserted alias] -new [inserted new key password] -keystore [inserted keystore file name]

Still, there was an error "Keystore was tampered with, or password was incorrect"

The password exactly right. The key was copied from the computer on which it was generated at the first time.

The application has already been published in the google play market, so I can not create a new keystore.

johnrao07
  • 6,690
  • 4
  • 32
  • 55
  • 2
    [Please, try these possible solutions](http://stackoverflow.com/questions/16891182/keytool-error-keystore-was-tampered-with-or-password-was-incorrect). – Bonatti Jan 06 '16 at 10:07
  • Copy the key back to the host pc and check for differences. Like so if on linux: `diff key keyCopy` – MeetTitan Jan 06 '16 at 10:07
  • @Elena Kovaleva, Hi I am facing same issue with my application please try to help me How did you solve this. please ping me on **sndpdevhare10@gmail.com** – Sandeep Devhare Aug 09 '16 at 14:12

3 Answers3

1

I solve this by using the latest build tool in build.gradle

dependencies {
    classpath 'com.android.tools.build:gradle:1.5.0'
}

Took me entire day to figure it out.

Morrow
  • 11
  • 3
0

Simplest option is to overwrite the keystore file with a backedup copy from a date it was known to be working. Doing something wrong when attempting to fix the keystore may make the situation worse.

Viral Patel
  • 32,418
  • 18
  • 82
  • 110
-1

Helped up key using AndroidKeystoreBrute library with the same password and key alias. Perhaps the old key is damaged in some way , because in the path alias to it did not show up.