1

What is the easiest way to sign an Android apk file, if you don't have an existing keystore?

I read many tutorials on the internet that suggest that it's necessary to create a keystore with a command line tool and that therefore Android Studio can't do the task on it's own. Is that still true?

Otherwise is there an easier way to go about the task?

The existing StackOverflow question on APK signing has many Eclipse-specific answers, so I decided to ask a new question.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Christian
  • 25,249
  • 40
  • 134
  • 225

1 Answers1

4

You can create a keystore from Android Studio itself.

Just go to Build -> Generate Signed APK -> Select your module. You will be able to select an existing keystore or to create one. To create it, you will need to enter a few informations about yourself, and two passphrases, one for the keystore and one for the alias. Then you will be able to sign your apk. Later, you will have to reuse the same keystore.

Make sure to save the keystore, because only the apps signed with it will be allowed to be uploaded to the Play Store, and to update on devices.

For more informations, as always, Android documentation

maxoumime
  • 3,441
  • 1
  • 17
  • 23