gradle - can't generate signed APK from Android studio "Execution failed for task ':packageRelease'" -
i using android studio 1.2.2 , tried generate apk proguard setting. can't , got below error message.
"execution failed task ':packagerelease'.
unable compute hash of /users/documents/projectx/app/build/intermediates/classes-proguard/release/classes.jar "
the proguard setting simple.
-dontshrink -dontoptimize -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontpreverify -verbose
and gradle file below.
apply plugin: 'com.android.application' apply plugin: 'com.google.gms.google-services' android { compilesdkversion "google inc.:google apis:22" buildtoolsversion "21.1.2" defaultconfig { applicationid "com.bientus.cirque.sansotong" minsdkversion 15 targetsdkversion 22 versioncode 1 versionname "1.0" // multidexenabled true } buildtypes { debug { debuggable true } release { minifyenabled true //proguardfiles 'proguard-project.txt', 'proguard.cfg' //proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-project.txt', 'proguard.cfg' proguardfiles 'proguard-project.txt' } } } dependencies { compile filetree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:22.0.0' compile "com.google.android.gms:play-services:7.5.0" // compile 'com.android.support:multidex:1.0.0' } buildscript { repositories { // mavencentral() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.2.3' classpath 'com.google.gms:google-services:1.3.0-beta1' } }
can give idea or thought? thank much!
just add project's proguard-rules:
-keep public class com.google.android.gms.** -dontwarn com.google.android.gms.**
Comments
Post a Comment