錯誤:Proguard的錯誤,而建設的apk版本爲Android
Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'. java.io.IOException: Can't write [C:\Users\user\Desktop\ProjetsAndroidStudio\v_3\app\build\intermediates\transforms\proguard\release\jars\3\1f\main.jar] (Can't read [C:\Users\user\Desktop\ProjetsAndroidStudio\v_3\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-analytics\8.3.0\jars\classes.jar(;;;;;;**/*.class)] (Duplicate zip entry [auc.class == classes.jar:com/google/android/gms/analytics/internal/Command$1.class]))
proguard-rules.pro:
-dontpreverify
-optimizations !code/simplification/arithmetic
-dontnote
-repackageclasses ''
-allowaccessmodification
-dontskipnonpubliclibraryclasses
-ignorewarnings
-keepattributes *Annotation*,EnclosingMethod
-keepattributes Signature,RuntimeVisibleAnnotations,AnnotationDefault
-dontskipnonpubliclibraryclassmembers
#Configuration de base Android:
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService
-keep public class * extends android.view.View {
public <init>(android.content.Context);
public <init>(android.content.Context, android.util.AttributeSet);
public <init>(android.content.Context, android.util.AttributeSet, int);
public void set*(...);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
-keepclassmembers class * {
@android.webkit.JavascriptInterface <methods>;
}
-keepclassmembers class * extends android.content.Context {
public void *(android.view.View);
public void *(android.view.MenuItem);
}
-keepclassmembers class * implements android.os.Parcelable {
static ** CREATOR;
}
-keepclassmembers class **.R$* {
public static <fields>;
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
#Pour supprimer les logs lors de la compilation
-assumenosideeffects class android.util.Log {
public static int v(...);
public static int d(...);
public static int i(...);
public static int w(...);
public static int e(...);
public static int wtf(...);
}
#Pour que proguard ignore toutes les classes contenues dans un certain package
#Pour la librairie Jackson (parsing JSON)
-keep class org.codehaus.jackson.** { *; }
-dontwarn org.**
#Pour ActionBarSherlock (d'aprËes le site officiel)
-keep class android.support.v4.app.** { *; }
-keep interface android.support.v4.app.** { *; }
-keep class com.actionbarsherlock.** { *; }
-keep interface com.actionbarsherlock.** { *; }
提前感謝!
你找到它的任何解決方案?我被困在最後2天,需要幫助:( –