11

I am unable to run my signed, release keystore in Eclipse:

I get the error:

Keystore was tampered with, or password was incorrect

How can I resolve this?

Here is the error: alt text

Here is me successfully signing the keystore: alt text

Sheehan Alam
  • 60,111
  • 124
  • 355
  • 556

5 Answers5

15

In Windows->Preferences->Android->Build you can just change your DEBUG KEYSTORE. The Keystore you specify there, is not for signing an app for release, but just for debugging.

Like the default debug keystore, the custom debug keystore needs to have the following:

Keystore password: "android"
Key alias: "androiddebugkey"
Key password: "android"

Except for the name of the keystore itself, information about the organizational units and the key behind the alias, all data have to be same as the default debug keystore

Pascal Klein
  • 23,665
  • 24
  • 82
  • 119
3

The obly thing i can advise is to check the password for the appropriate language and case, and also make sure your keystore is in consistent state(but don't have a clue how to do it, if you haven't generated checksum).

The general advise for keystores: always make a backup.

Also, keystore is the thing to make sure you're one who have created the application in the moment of updating it. IOW, it is a tool to let only you update your application.

Vladimir Ivanov
  • 42,730
  • 18
  • 77
  • 103
  • I am working on source code that was handed to me (from an offshore team). I created a keystore by simply exporting it in Eclipse. Can I just create a new keystore? – Sheehan Alam Nov 25 '10 at 20:18
  • 2
    You can create new keystore, but with it you can't update the application in android market. I've updated the answer, see it again please. – Vladimir Ivanov Nov 25 '10 at 20:23
  • I will try re-creating it. The app is luckily not in the Android Market yet. Will that suffice? – Sheehan Alam Nov 25 '10 at 20:33
  • If app is not in the android market that the keystore doesn't have any meaning. As it is not late, backup the created keystore and remember the password. – Vladimir Ivanov Nov 25 '10 at 20:34
  • I'm not sure why Eclipse is giving me that error, because when I export my APK with that keystore (with the right password) my users are able to install. Only when I try to run it in Eclipse I get that invalid keystore error... – Sheehan Alam Nov 25 '10 at 20:41
  • What do you mean run it in eclipse? How are you running an apk in eclipse? – Falmarri Nov 26 '10 at 00:02
  • I meant run the app on my phone. But i hit the play button in Eclipse to launch it. – Sheehan Alam Nov 26 '10 at 06:19
  • 2
    The play button on eclipse uses your debug keystore – Falmarri Dec 06 '10 at 01:36
0

Sheehan , I support Vladimir's suggestion to backup your keystores.

To avoid getting keystore errors Simply backup the current keystore & then delete it(from /home/user/.android/debug.keystore) & recompile the app & eclipse will automatically generate a keystore for you.

Always do backup your keystores for publishing/republishing the app.

Good Luck!

100rabh
  • 6,156
  • 5
  • 27
  • 41
0

The easiest way is to create a keystore is from inside eclipse itself as part of the export process. When excporting your app click the option to generate a new keystore. Fill out the appropriate information and Eclipse will generate a new, valid keystore for you.

And always backup your keystores. I have a usb drive that has a copy of all of my keystores.

Phobos
  • 9,447
  • 3
  • 25
  • 30
0

I am confused about what you are trying to achieve here. Is it that you just can't edit it as it is? When preparing it for delivery to the market, you would be exporting it unsigned (ie without the debug keystore).

Could it possibly be that you have the "force error when external jars..." option checked?

I third (or fourth) what others have said here about backing up and deleting the keystore at ~/.android - http://developer.android.com/guide/appendix/faq/troubleshooting.html#signingcalendar.

Assuming that you've already done so, I won't "google that for you", but it might be an eclipse problem.

Hope you get it going soon.

roy
  • 3,706
  • 6
  • 30
  • 53