Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve the failed verification with zipalign?

I have a problem with zipalign. I can't go through the proces. Each run ends with Verification FAILED. For some files i see something like this

2574474 res/drawable-xxxhdpi-v4/abc_btn_radio_to_on_mtrl_000.png (BAD - 2)

for the reset

7044070 res/layout/notification_template_media.xml (OK - compressed)

The apk is generated but when I upload it via console I receive info that it is not compressed properly. What can I do ?

like image 707
Fixus Avatar asked Jun 09 '16 19:06

Fixus


People also ask

How zipalign works in Android?

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.

Why zipalign APK?

zipalign is an archive alignment tool that provides important optimization to Android application (APK) files. The purpose is to ensure that all uncompressed data starts with a particular alignment relative to the start of the file.

Where is Zipalign located?

The zipalign file is located in build-tools in the path where Android SDK is installed. If you want to enter your own password without saving it, the -storepass and -keypass related options need to be removed. Windows users can drag the app file to be signed to the LIAPP_sign_window.


1 Answers

Seems like gradle has pushed a new version without the zipalign task. I had the same issue after changing this:

classpath 'com.android.tools.build:gradle:2.+'

to

classpath 'com.android.tools.build:gradle:2.1.2'

The problem was solved for me.

like image 61
Chen Avatar answered Oct 20 '22 20:10

Chen