Simplest way to sign your Android app for publishing in Google Play.

14:13:00 0 Comments A + a -


            Only when I started reading the google documentation did I realize how confusing it can get to sign the Android app for publishing in the Android market. The documentation is way too elaborate(which is a good thing if you're not in a hurry;)) and runs for pages which some may find intimidating. Therefore, I decided to help fellow noobs to publish their apps hassle-free. First of all, you need to check your application for "debug" mode. You could do that by looking in the Android manifest file for the "debuggable" attribute.
android:debuggable="true"
            This attribute can be explained as- whether or not the application can be debugged, even when running on a device in user mode "true" if it can be, and "false" if not. The default value is "false". Before signing your app it's important that you remove this attribute or make it false. All Android apps have to be signed by a private key before uploading to the Android market. Google is generous enough to allow the developers to upload the .apk file with a self-signed developer certificate. Assuming your app is tested, compiled and cleaned and is now market-ready, you could either sign your app manually or simply use the "Export Android Application" wizard in the Eclipse-ADT. You might come across a number of tutorials and guides to manually sign and optimize the app using tools like keytool, zipalign or jarsigner in the command-line but the wizard in the Eclipse-ADT will actually compress and optimize the app for you as well. 

  Steps: 

1. Click File ---> Export---> Export Android Application.

 2. Browse and select your project. Click---> Next

   

3. Create a new folder for the keystore file in a folder. You could sign using an existing keystore or create a new keystore. My keystore file is present at the path D:\Application\keystore. Browse and select the folder and provide a keystore name, like filename.keystore. If you forget this step you might get an error saying- "Keystore is a directory path". I'm creating a new keystore here. Provide a strong password, re-confirm the password and click--> Next.




   

 4. Complete the form with an alias , provide the key password entered previously, select a validity period of your choice  and fill out the form. Click--> Next

   

 5. In the last step, browse and select a destination folder for your signed .apk file. In my case it is D:\Application\apk and provide a filename for your apk and click---> Finish.




Now your signed .apk file is ready for upload in the developer console for publishing. 

Android Developer, Tech Enthusiast, Startup Aficionado, Seeker of Happiness.