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 ?
zipalign is a zip archive alignment tool. It ensures that all uncompressed files in the archive are aligned relative to the start of the file. This allows those files to be accessed directly via mmap(2) , removing the need to copy this data in RAM and reducing your app's memory usage.
For AAB files, there is no official guide to zipalign, so it is not required.
Zipalign Command (Step-By-Step) Navigate to your program files directory and open up android-sdk> build-tools > the build-tools version you have (27.0. 3 for me). At the bottom of that folder you should see your zipalign file.
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
If you use Eclipse export wizard, it will automatically align it for you. However you can do it manually yourself
To align infile.apk and save it as outfile.apk:
zipalign [-f] [-v] <alignment> infile.apk outfile.apk
This website can provide more answers :) http://developer.android.com/tools/help/zipalign.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With