46

I'm trying to export a signed Android application in Eclipse.

I think I'm going in the right direction:

  • Right click on project > Android Tools > Export Signed Application Package
  • The Export Android Application wizard appears.
  • Select the project I want to export, click Next.
  • The Keystore Selection screen appears.

It looks like this (forgive my ascii, file uploader not working):

[ ] Use existing keystore
[o] Create new keystore

Location: __________ [Browse]
Password: __________
Confirm: __________

I don't have an existing keystore, so I click the "Create new keystore" radio button. The location field remains active, must be filled, and if I browse to some directory I'd like the keystore to go after it's created, the dialog complains that "Keystore path is a directory."

  1. Is it actually possible to create a keystore with this dialog?
  2. If not, how can I create one? My google-fu has provided only failed experiments for me so far. I'm using Eclipse on a PC.

The Compile and sign with Eclipse ADT section in the android developer page seems to think this will just work out, but I can't get past this part of the dialog. I can export unsigned .apk files just fine.

Thank you!

Sophie
  • 463
  • 1
  • 4
  • 4

3 Answers3

45

You should be able to create a keystore with the dialog, yes. After navigating to the folder you want to use, type a name in the 'File name:' field in the file browse window, e.g. sophie.keystore. Then you should be able to proceed.

Alternatively, you can create it on the command line as described in the docs.

The command looks like this:

keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

for example:

keytool -genkey -v -keystore ~/dcaunt.keystore -alias dcaunt -keyalg RSA -keysize 2048 -validity 10000
David Snabel-Caunt
  • 57,804
  • 13
  • 114
  • 132
  • I didn't initially have luck with that command but it must've been some kind of user error on my part, thanks for confirming it's the right thing. I said this below, too, but that `keystorename.keystore` bit was the part I was missing. – Sophie Jul 11 '11 at 20:43
  • 3
    If you're on Windows, try `keytool -genkey -v -keystore dcaunt.keystore -alias dcaunt -keyalg RSA -keysize 2048 -validity 10000` (remove the ~/). Otherwise, nevermind, and I'm glad you got it working with Eclipse. – David Snabel-Caunt Jul 11 '11 at 20:59
  • Thanks a ton David. You're my savior! :) – buggydroid Oct 12 '12 at 04:48
1

If you have created an app right now with the sdk and adt plugin, like the hello world app, then you'll have to chose the debug.keystore file while exporting. The files is in c:/users/.../.android/debug.keystore, after that when asked for password.

user
  • 86,916
  • 18
  • 197
  • 190
0

Step 1 : How to generate keystore in eclipse

Step 1 : How to generate keystore in eclipse

Step 2: Browse Directory and put filename.keystore and create password

[Step 2: Browse Directory and put filename.keystore and create password]

Step 3: Fill Expiry details and License detail

2[Step 3: Fill Expiry details and License detail]3

You are done!

Akshay Mishra
  • 1,535
  • 2
  • 15
  • 14