Comment le programme d'installation PROGUARD pour Jackson JSON Processeur?
Je suis à l'aide de Jackson JSON Processeur pour mon application.Inclus cette aide
compile 'com.fasterxml.jackson.core:jackson-databind:2.4.2'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.4.2'.
Et mon proguard configuration.
## BEGIN -- Google Play Services proguard.txt
-keep class * extends java.util.ListResourceBundle {
protected java.lang.Object[][] getContents();
}
# Keep SafeParcelable value, needed for reflection. This is required to support backwards
# compatibility of some classes.
-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
public static final *** NULL;
}
# Keep the names of classes/members we need for client functionality.
-keepnames @com.google.android.gms.common.annotation.KeepName class *
-keepclassmembernames class * {
@com.google.android.gms.common.annotation.KeepName *;
}
# Needed for Parcelable/SafeParcelable Creators to not get stripped
-keepnames class * implements android.os.Parcelable {
public static final ** CREATOR;
}
## END -- Google Play Services proguard.txt
-keepattributes Signature,RuntimeVisibleAnnotations,AnnotationDefault
-dontskipnonpubliclibraryclassmembers
-dontskipnonpubliclibraryclasses
-keepattributes *Annotation*.
-keep class org.codehaus.jackson.**
-dontwarn twitter4j.**
-dontwarn com.facebook.android.BuildConfig
-dontwarn org.apache.commons.**
-keep class org.apache.http.** { *; }
-dontwarn org.apache.http.**
-dontwarn com.nhaarman.listviewanimations.**
Cependant lorsque j'essaie de compiler en mode debug, j'obtiens l'erreur suivante.
26207-26207/com.blah E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.blah, PID: 26207
java.lang.NoSuchFieldError: PUBLIC_ONLY
at java.lang.Class.getDeclaredAnnotation(Native Method)
at java.lang.Class.getAnnotation(Class.java:290)
at com.b.a.c.f.ah.<clinit>(Unknown Source)
at com.b.a.c.z.<clinit>(Unknown Source)
at com.blah.utils.c.<init>(Unknown Source)
at com.blah.main.a.a(Unknown Source)
at com.blah.main.b.a.a(Unknown Source)
at com.blah.main.b.a.onCreateView(Unknown Source)
De travail sur elle pendant un long moment!Vous remercie de votre aide!Merci!
Vous devez vous connecter pour publier un commentaire.
Après beaucoup de débogage enfin trouvé la réponse à ma Proguard configuration est
votre classe représente la lecture de poseur de classes/classe vous aide à analyser votre réponse.
Aussi j'ai ajouté
compile 'com.fasterxml.jackson.core:jackson-core:2.4.2'
pour ma Gradle fichier qui manquait auparavant. Maintenant, mon Proguard fonctionne comme une bête..;-)
Modifié un litte de @goonerDroid travail pour moi