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.
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..
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With