How to zip Align APK file in android?

Luckyy Nickey picture Luckyy Nickey · Apr 28, 2014 · Viewed 82.1k times · Source

I am uploading my first APK file to google play but I am getting following error.

You uploaded an APK that is not zip aligned. You will need to run a zip align tool on your APK and upload it again.

Can any one tell me how to zip align my apk file ?

Please tell me steps for that ?

Answer

A Nice Guy picture A Nice Guy · Apr 28, 2014

Read the documentation from Google itself

The steps should be simple to follow.

Please follow this doc from google for complete publishing details

In short,complete steps in a nutshell(I am assuming you use eclipse/android sdk):

 1. Check android_manifest.xml and verify that android:debuggable  attribute is set to false in your manifest file            
 2. Check the android:versionCode and android:versionName attributes. 
    (if this is the first time you are uploading a apk,   
    ignore, else if it is a new version of existing apk, make sure these   
    values are larger than previous apk)
 3. Export unsigned application package from Eclipse
 4. Sign the application using release key certificate(not debug key certificate)
 5. Zip align the package
 6. Upload in google play