How to solve the failed verification with zipalign?

亡梦爱人 提交于 2019-12-09 13:07:27

问题


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 ?


回答1:


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.




回答2:


Chen is right. When you upgrade your AS, you need to check your build.grade.

buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.1.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } }

check that gradle version is 2.1.2 or not. I try 2.2.0-alpha3, and always get zipalign fialed. Just downgrade grade version to 2.1.2 Then solve this problem.

Try it.



来源:https://stackoverflow.com/questions/37734977/how-to-solve-the-failed-verification-with-zipalign

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!