1

I have an apk finished, when I tried to upload it, I get an error of zipalign, I tried to fix it but I didn't know how! The line is

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

Let's say I have mine.apk and I have zipalign.exe in my laptop, can someone please tell me what to type? I tried many things!

Sahar
  • 11
  • 2

3 Answers3

0

open command prompt in directory of zipalign.exe (found in sdk/build-tools/)

the command I use is:

zipalign -v 4 "<apk>" "<apk-zipaligned>"
rosghub
  • 8,924
  • 4
  • 24
  • 37
0
zipalign.exe -v 4  mine.apk  mine_out.apk

v is for verbose output,4 provides 32-bit alignment

The mine_out.apk is the the output file.

EDIT:

Add your android:debuggable="false" linke this:

<application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" 
        android:debuggable="false">
tianwei
  • 1,859
  • 1
  • 15
  • 24
  • It worked but gave me another error "You uploaded a debuggable APK. For security reasons you need to disable debugging before it can be published in Google Play." – Sahar Feb 28 '15 at 08:55
  • @Sahar, see this: http://stackoverflow.com/questions/19994874/unable-to-upload-new-apk-file-to-android-play-store – tianwei Feb 28 '15 at 09:01
  • I just added false in android:debuggable="false" into manifest .. it gave me an error line! :( – Sahar Feb 28 '15 at 09:06
  • @Sahar It should not be an error, clean your project and build it again please. – tianwei Mar 02 '15 at 06:42
0

zipalign -v 4 c:/ad/shilo_release_unsigned.apk c:/ad/shilo_release_ready.apk The command prompt should return a success message "Verification successful".

AmDroid
  • 131
  • 5