Search Tutorials

Loading...

Wednesday, 9 July 2014

Sign Android Application and Publish on Google Play

Congrats!! You have completed your android project and going to publish app on Google Play. Before publishing app, check all functions properly and test your app accurately. After testing of your app, you have to sign your app for publishing on Google Play. Step for signing android app is given below:-

1. First of all, Right click on your project -> Android Tools -> Export Unsigned Android Application -> Save APK file.

If you got any error, simply go to workspace log and press on red button & permanently delete error(s).

How to Sign Android Application and Publish on Google Play
Remove Error(s)

2. Now open Command Prompt (CMD).

3. Generate Certificate for signing app by writing it on cmd:-

keytool -genkey -v -keystore Certificate.keystore -alias key -keyalg RSA -keysize 2048 -validity 20000

Now this will prompt to many questions like:-

Enter keystore password:
Re-enter new password:

What is your first and last name?
[Unknown]: Md Mohsin

What is the name of your organizational unit?
[Unknown]: coders hub

What is the name of your organization?
[Unknown]: coders hub

What is the name of your City or Locality?
[Unknown]: Sherkot

What is the name of your State or Province?
[Unknown]: Uttar Pradesh

What is the two-letter country code for this unit?
[Unknown]: IN

And finish it and now you have made certificate for your app.

How to Sign Android Application and Publish on Google Play
Create Certificate for Android Application

4. Place your android APK file in F Drive(change path according to you if you don’t want to put APK in F Drive) and run below command on CMD:-

jarsigner -verbose -keystore Certificate.keystore F:YourFileName.APK key

5. Go to F drive in CMD and verify your android APK file by typing it on CMD:-

jarsigner -verify YourFileName.APK

Note:- We can do all above steps using eclipse. Right click on project -> Android Tools -> Export Signed Application Package and than do the same things on eclipse like creating new keystore and sign APK file.

Export Signed Android Application

6. Now go to your adt-bundle folder -> sdk -> tools and than open cmd(SHIFT+Right Click -> Open CMD Here) there and zipalign your APK file by typing on cmd:

zipalign -v 4 F: YourFileName.APK D: YourFileName.APK

Your final signed android APK will be in D Drive (Change path according to you if you don’t have D drive in your PC).
Now time to publish signed Android APK file on Google play store. Go publisher link:- Google Play

Login with your Gmail id, Accept terms & conditions and pay 25$ via PayPal or your ATM card. If you don’t have PayPal account and your card is not accepted by Google than go to Entropay.com and create virtual visa card and pay via Entropay virtual visa card.

Now use some description for your android app and must have 512*512 size of logo image & minimum 2 screenshots of your app. Now publish your android app & share link with your friends to increase downloading.

After publishing your app, you can upload new version of your app. So, keep your certificate and signed android APK file in your computer or mobile and if you lost your certificate & have signed APK than you can get all values and create same certificate by typing on CMD:-

jarsigner -verify -certs -verbose YourFileName.APK

To upload new version of APK, you will have to increase value of version code in numeric value and version name in decimal value in AndroidManifest.xml file.

Comment your valuable feedback & Share this post.

Related Post:-

1. Add Google Admob Ads in Android Application

2. How to Add Facebook SDK in Android Application

3. Display all Mobile Contacts in Android

4. Perform Action on any Hardware Button in Android

5. Shared Preferences in Android

11 comments:

  1. i donot have my app at gpoogle play store instead amazon.but i am using admob with google play service.but app not showing me ads.plz help mohsin bhai as soon as posible

    ReplyDelete
    Replies
    1. Share your process what you have done?

      Delete
    2. This comment has been removed by the author.

      Delete

  2. I getting below error when i try to generate certificate for my android app.

    C:\Users>keytool -genkey -v -keystore Certificate.keystore -alias key -keyalg RS
    A -keysize 2048 -validity 20000
    'keytool' is not recognized as an internal or external command,
    operable program or batch file.

    ReplyDelete
    Replies
    1. Use second method given above via android SDK.

      Delete
    2. where is your second method???

      Delete
    3. check note given after 6th step.

      Delete
  3. Can you please help me in resolving above problem as i didnt publish any app till now in market i dont know how to do this.

    ReplyDelete
  4. can i get android source code for android malware detection code

    ReplyDelete
  5. If you're looking for a good contextual ad company, I suggest you have a look at Chitika.

    ReplyDelete

Back to Top