Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

zipalign verification failed resources.arsc BAD-1

enter image description here

I try to upload my app to gplay but fail because my apk doesn't zipaligned. i try to zipalign but i got verification failed. really don't have idea, someone please tell me what to do. thanks in advance.

like image 288
maghfirzakir Avatar asked Jun 27 '16 06:06

maghfirzakir


3 Answers

I found an easier way - just align from commandline.. TWICE! After aligning two times I was able to upload my apk.

Delete the OLD file and Rename the Second One and Align it Again..

like image 184
Ishmael Chibvuri Avatar answered Oct 23 '22 00:10

Ishmael Chibvuri


In case someone else has the same problem with gradle plugin '3.6.0' and later and because I spent several hours trying to track this down.

Gradle Plugin 3.6.0 is page aligning and packaging your native libraries uncompressed https://developer.android.com/studio/releases/gradle-plugin?hl=el#3-6-0

The fix is to disable the uncompressed packaging of your native libraries by adding

android:extractNativeLibs="true"

to your AndroidManifest.xml as an attribute on the application tag.

like image 38
Klitos G. Avatar answered Oct 22 '22 22:10

Klitos G.


No need to manually, do this:

buildTypes {
            release {
                minifyEnabled true
                proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
                zipAlignEnabled true 
               //uncomment for automatically zip aligned by studio
            }
        }

build.gradle

 set classpath 'com.android.tools.build:gradle:2.2.0-alpha3'

to

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

see my answer here

like image 37
Vrajesh Avatar answered Oct 23 '22 00:10

Vrajesh