Can't Generate Signed APK From Android Studio "Execution Failed For Task ':packageRelease'"
Solution 1:
Just add to the project's proguard-rules:
-keep public class com.google.android.gms.**
-dontwarn com.google.android.gms.**
Solution 2:
It worked after setting followings in 'proguard-project.txt'. Obviously the gradle should be set for this file.
-dontwarn android.support.v7.**
-keep class android.support.v7.** { *; }
-keep interface android.support.v7.** { *; }
Solution 3:
Look at your build output. You might have proguard warnings in there, like if you have 2 libraries that share some class (with potentialy different versions).
This might prevent proguard to compute an hash.
I had the same issue while having both openIAB and opfIAB (both use Amazon and google IAB) in my build. Removing one of these libs resolved my issue
Solution 4:
OK! its very easy ! just following step by step: build.gradle :minifyEnabled false -> minifyEnabled true proguard-rules.pro : you have to add third libraries that you use in your project like piccaso and etc. if you do this in android studio , it decline this files.
-dontwarn android.support.**
-dontwarn com.github.**
-dontwarn com.squareup.picasso.**
-dontwarn com.etsy.android.grid.**
it works :)
Solution 5:
I had the problem too and the best way to solve it is: Go to the gradle console and see where there is a warning e.g
Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient
Now open the proguard rules file and scroll to the bottom and add the line
-dontwarn com.squareup.okhttp.**
For any missing classes that you find on the gradle console you basically add the line
-dontwarn followed by class name
Hope this works for everyone too. Good luck!
Post a Comment for "Can't Generate Signed APK From Android Studio "Execution Failed For Task ':packageRelease'""