transformClassesAndResourcesWithproguardforrelease " - Fehler in Android

Hallo, ich bin kämpfen, um das erstellen der release-version für mein Projekt. Ich habe versucht viele Dinge auf Progaurd durch SO /Google helfen, aber ich bin noch nicht in der Lage, zum erstellen der release-version.

Kann mir jemand helfen mit diesem? Ich bekomme immer diese Frage:

Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
> java.io.IOException: Please correct the above warnings first.

Hier ist das vollständige detaillierte Fehler: http://justpaste.it/perror sorry ich musste wie ein link, da ist es riesig.

Hier sind Abhängigkeiten:

//compile fileTree(dir: 'libs', include: ['*.jar'])
 testCompile 'junit:junit:4.12'
 compile 'com.android.support:appcompat-v7:23.1.1'
 compile 'com.android.support:design:23.1.1'
 compile 'com.rengwuxian.materialedittext:library:2.1.4'
 compile 'com.squareup.picasso:picasso:2.5.2'
 compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'
 compile 'org.apache.httpcomponents:httpcore:4.4.1'
 compile 'com.squareup.retrofit:retrofit:1.9.0'
 compile 'com.loopj.android:android-async-http:1.4.8'
 compile 'com.android.support:cardview-v7:23.1.1'
 compile 'com.android.support:recyclerview-v7:23.1.1'
 compile project(':pageIndicator')
 compile 'com.github.neopixl:PixlUI:v1.0.6'
 compile 'com.github.bumptech.glide:glide:3.6.1'

Meine progaurd Datei:

# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
-dontwarn com.google.code.**
-dontwarn  org.apache.**
-dontwarn  jp.wasabeef.recyclerview.**
-dontwarn  com.nostra13.universalimageloader.**
-dontwarn  org.acra.** 

#wasabeef recyclerview
-keep class jp.wasabeef.recyclerview.** { *; }
-keepattributes Signature
#HTTP Legacy
-keep class org.apache.** { *; }
-keepattributes Signature
#Universal Image Loader
-keep class com.nostra13.universalimageloader.** { *; }
-keepattributes Signature
#Acra
-keep class org.acra.**  { *; }
-keepattributes Signature
#Support libraries
-keep class com.android.** { *; }
-keepattributes Signature

# Keep the annotations
-keepattributes *Annotation*
-allowaccessmodification
-keepattributes *Annotation*
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable
-repackageclasses ''

-dontnote com.android.vending.licensing.ILicensingService

# Explicitly preserve all serialization members. The Serializable interface
# is only a marker interface, so it wouldn't save them.
-keepclassmembers class * implements java.io.Serializable {
    static final long serialVersionUID;
    private static final java.io.ObjectStreamField[] serialPersistentFields;
    private void writeObject(java.io.ObjectOutputStream);
    private void readObject(java.io.ObjectInputStream);
    java.lang.Object writeReplace();
    java.lang.Object readResolve();
}

# Preserve all native method names and the names of their classes.
-keepclasseswithmembernames class * {
    native <methods>;
}

-keepclasseswithmembernames class * {
    public <init>(android.content.Context, android.util.AttributeSet);
}

-keepclasseswithmembernames class * {
    public <init>(android.content.Context, android.util.AttributeSet, int);
}

# Preserve static fields of inner classes of R classes that might be accessed
# through introspection.
-keepclassmembers class **.R$* {
  public static <fields>;
}

# Preserve the special static methods that are required in all enumeration classes.
-keepclassmembers enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}

-keep public class * {
    public protected *;
}

-keep class * implements android.os.Parcelable {
  public static final android.os.Parcelable$Creator *;
}


-keep class com.splunk.** { *; }
-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.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService
-keepclasseswithmembernames class * {
    native <methods>;
}
-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 enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
  public static final android.os.Parcelable$Creator *;
}

-keep class com.splunk.** { *; }
-dontwarn rx.**

-dontwarn okio.**

-dontwarn com.squareup.okhttp.**
-keep class com.squareup.okhttp.** { *; }
-keep interface com.squareup.okhttp.** { *; }

-keep class org.apache.http.** { *; }
-dontwarn org.apache.http.**
-dontwarn android.net.**

-dontwarn retrofit.**
-dontwarn retrofit.appengine.UrlFetchClient
-keep class retrofit.** { *; }
-keepclasseswithmembers class * {
    @retrofit.http.* <methods>;
}

-keepattributes Signature
-keepattributes *Annotation*

-keep class sun.misc.Unsafe { *; }
#your package path where your gson models are stored
-keep class com.ylg.others.** { *; }
Aussehen Ausgabe mit gradle-Datei
Diese Art von Problem ist bekannt, passiert, wenn die SDK-version, gradle-version und build-tools version sind nicht kompatibel: stackoverflow.com/questions/33877134/... ich habe vor dem gleichen problem, und habe nicht in der Lage, es zu lösen. Ich habe vorübergehend behoben, indem minifyEnabled zu false.
wenn wir das tun, dass es nicht Verschleiern mein code richtig?
hast u finden Sie die Lösung für dieses Problem?
NÖ. Haben Sie eine chance, es zu bekommen?

InformationsquelleAutor Sanjana Nair | 2015-11-30

Schreibe einen Kommentar