BackgroundIn last post we saw how can we create a simple "Hello World" Androd Application. In this post we will see how can we sign the application with your own private key and export apk.
Exporting APK of your Android Application
- Right click on the project and select Export. In the list options select Android Application.
- Next you may get a Project check window in which you will have to choose your project. "Hello World" project in this case.
- Next window that you would get is to choose the keystore and provide it's password. I have already create a keystore and have also explained it an a previous post. Follow it to create your own keystore - Creating a self signed certificate for SSL using java keytool
- Now you can choose to use an existing key or create a new one. I had create a key previously for running SSL on my tomcat which is why you may see it in the below screenshot. But lets create a new key for this android application.
- Go ahead add your details to create a new key. Also you will have to provide a password for it. Recommended value for validity years is 35 but you can put your own value.
- That should be it. Next screen will ask to to choose location for exporting your APK. Select the location you wish you apk to be exported and click Finish.
- And you have your apk signed with your private key whose password only you know.
- Android "Hello World" Application development tutorial
- Creating a self signed certificate for SSL using java keytool
- How to build an APK file in Eclipse?(SO)