You uploaded an APK that is not zip aligned error

I got the same "You uploaded an APK that is not zip aligned... blah, blah" error when by mistake I tried to upload a DEBUG version of my .apk file to Google Play. It's a bit misleading error because the real problem is that you cannot distribute a debug version which additionally is not signed with your Google Android Developer key. (You can only upload an .apk compiled as release version, and it must be signed, which happens in the same step, at least if you're using Eclipse).

Make sure you distribute an .apk file which is your Signed Release version, as described here:

http://developer.android.com/tools/publishing/app-signing.html#releasecompile


You can run zipalign manually in command line:

zipalign [-f] [-v] <alignment> infile.apk outfile.apk

Note that zipalign is located inside ${sdk.dir}\tools

For more details visit zipalign


[Update]

Also, If you need to sign it you can run:

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore YOURKEYSTORE unsigned.apk alias_name

(jarsigner is located inside java JDK_HOME/bin)