2016-05-31 251 views
0

問題當我產生我釋放apk使用proguard ..任何人都可以幫助我嗎?安卓proguard上gson不能發佈apk



 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.element.AnnotationValue 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.element.AnnotationValue 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.element.AnnotationMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.element.AnnotationMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.element.AnnotationValue 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.element.AnnotationValue 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.element.AnnotationValue 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.element.VariableElement 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.element.VariableElement 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.element.AnnotationMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.element.AnnotationMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.element.VariableElement 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.element.VariableElement 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.element.AnnotationValue 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.element.AnnotationValue 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.util.SimpleAnnotationValueVisitor6 
Warning: dagger.shaded.auto.common.SuperficialValidation$3: can't find referenced class javax.lang.model.type.TypeMirror 
Warning: dagger.shaded.auto.common.Visibility: can't find referenced class javax.lang.model.element.Element 
Warning: dagger.shaded.auto.common.Visibility: can't find referenced class javax.lang.model.element.Element 
Warning: dagger.shaded.auto.common.Visibility: can't find referenced class javax.lang.model.element.ElementKind 
Warning: dagger.shaded.auto.common.Visibility: can't find referenced class javax.lang.model.element.ElementKind 
Warning: dagger.shaded.auto.common.Visibility: can't find referenced class javax.lang.model.element.ElementKind 
Warning: dagger.shaded.auto.common.Visibility: can't find referenced class javax.lang.model.element.Element 
Warning: dagger.shaded.auto.common.Visibility: can't find referenced class javax.lang.model.element.Modifier 
Warning: dagger.shaded.auto.common.Visibility: can't find referenced class javax.lang.model.element.Modifier 
Warning: dagger.shaded.auto.common.Visibility: can't find referenced class javax.lang.model.element.Modifier 
Warning: dagger.shaded.auto.common.Visibility: can't find referenced class javax.lang.model.element.Modifier 
Warning: dagger.shaded.auto.common.Visibility: can't find referenced class javax.lang.model.element.Element 
Warning: dagger.shaded.auto.common.Visibility: can't find referenced class javax.lang.model.element.Element 
Warning: dagger.shaded.auto.common.Visibility: can't find referenced class javax.lang.model.element.Element 
Warning: dagger.shaded.auto.common.Visibility: can't find referenced class javax.lang.model.element.Modifier 
Warning: dagger.shaded.auto.common.Visibility: can't find referenced class javax.lang.model.element.Element 
Warning: dagger.shaded.auto.common.Visibility: can't find referenced class javax.lang.model.element.Element 
Warning: dagger.shaded.auto.common.Visibility: can't find referenced class javax.lang.model.element.Element 
Warning: io.jsonwebtoken.impl.Base64Codec: can't find referenced class javax.xml.bind.DatatypeConverter 
Warning: io.jsonwebtoken.impl.Base64Codec: can't find referenced class javax.xml.bind.DatatypeConverter 
Warning: io.jsonwebtoken.impl.Base64Codec: can't find referenced class javax.xml.bind.DatatypeConverter 
Warning: io.jsonwebtoken.impl.crypto.EllipticCurveProvider: can't find referenced class org.bouncycastle.jce.ECNamedCurveTable 
Warning: io.jsonwebtoken.impl.crypto.EllipticCurveProvider: can't find referenced class org.bouncycastle.jce.ECNamedCurveTable 
Note: com.amazonaws.metrics.AwsSdkMetrics: can't find dynamically referenced class com.amazonaws.metrics.internal.cloudwatch.DefaultMetricCollectorFactory 
Note: com.amazonaws.services.s3.internal.crypto.CryptoRuntime: can't find dynamically referenced class org.bouncycastle.jce.provider.BouncyCastleProvider 
Note: com.google.android.gms.maps.internal.zzad: can't find dynamically referenced class com.google.android.gms.maps.internal.CreatorImpl 
Note: com.google.common.util.concurrent.MoreExecutors: can't find dynamically referenced class com.google.appengine.api.ThreadManager 
Note: com.google.common.util.concurrent.MoreExecutors: can't find dynamically referenced class com.google.apphosting.api.ApiProxy 
Note: com.google.gson.internal.UnsafeAllocator: can't find dynamically referenced class sun.misc.Unsafe 
Note: dagger.shaded.auto.common.MoreTypes: can't find dynamically referenced class javax.lang.model.type.IntersectionType 
Note: com.google.common.cache.Striped64 accesses a declared field 'base' dynamically 
     Maybe this is program field 'com.google.common.cache.Striped64 { long base; }' 
Note: com.google.common.cache.Striped64 accesses a declared field 'busy' dynamically 
     Maybe this is program field 'com.google.common.cache.Striped64 { int busy; }' 
Note: com.google.common.cache.Striped64$Cell accesses a declared field 'value' dynamically 
     Maybe this is program field 'bolts.Capture { java.lang.Object value; }' 
     Maybe this is program field 'com.amazonaws.auth.SignatureVersion { java.lang.String value; }' 
     Maybe this is program field 'com.amazonaws.mobileconnectors.cognito.Record { java.lang.String value; }' 
     Maybe this is program field 'com.amazonaws.mobileconnectors.cognito.Record$Builder { java.lang.String value; }' 
     Maybe this is program field 'com.amazonaws.services.cognitoidentity.model.ErrorCode { java.lang.String value; }' 
     Maybe this is program field 'com.amazonaws.services.cognitosync.model.BulkPublishStatus { java.lang.String value; }' 
     Maybe this is program field 'com.amazonaws.services.cognitosync.model.Operation { java.lang.String value; }' 
     Maybe this is program field 'com.amazonaws.services.cognitosync.model.Platform { java.lang.String value; }' 
     Maybe this is program field 'com.amazonaws.services.cognitosync.model.Record { java.lang.String value; }' 
     Maybe this is program field 'com.amazonaws.services.cognitosync.model.RecordPatch { java.lang.String value; }' 
     Maybe this is program field 'com.amazonaws.services.cognitosync.model.StreamingStatus { java.lang.String value; }' 
     Maybe this is program field 'com.amazonaws.services.dynamodbv2.model.AttributeAction { java.lang.String value; }' 
     Maybe this is program field 'com.amazonaws.services.dynamodbv2.model.AttributeValueUpdate { com.amazonaws.services.dynamodbv2.model.AttributeValue value; }' 
     Maybe this is program field 'com.amazonaws.services.dynamodbv2.model.ComparisonOperator { java.lang.String value; }' 
     Maybe this is program field 'com.amazonaws.services.dynamodbv2.model.ConditionalOperator { java.lang.String value; }' 
     Maybe this is program field 'com.amazonaws.services.dynamodbv2.model.ExpectedAttributeValue { com.amazonaws.services.dynamodbv2.model.AttributeValue value; }' 
     Maybe this is program field 'com.amazonaws.services.dynamodbv2.model.IndexStatus { java.lang.String value; }' 
     Maybe this is program field 'com.amazonaws.services.dynamodbv2.model.KeyType { java.lang.String value; }' 
     Maybe this is program field 'com.amazonaws.services.dynamodbv2.model.ProjectionType { java.lang.String value; }' 
     Maybe this is program field 'com.amazonaws.services.dynamodbv2.model.ReturnConsumedCapacity { java.lang.String value; }' 
     Maybe this is program field 'com.amazonaws.services.dynamodbv2.model.ReturnItemCollectionMetrics { java.lang.String value; }' 
     Maybe this is program field 'com.amazonaws.services.dynamodbv2.model.ReturnValue { java.lang.String value; }' 
     Maybe this is program field 'com.amazonaws.services.dynamodbv2.model.ScalarAttributeType { java.lang.String value; }' 
     Maybe this is program field 'com.amazonaws.services.dynamodbv2.model.Select { java.lang.String value; }' 
     Maybe this is program field 'com.amazonaws.services.dynamodbv2.model.StreamViewType { java.lang.String value; }' 
     Maybe this is program field 'com.amazonaws.services.dynamodbv2.model.TableStatus { java.lang.String value; }' 
     Maybe this is program field 'com.amazonaws.transform.MapEntry { java.lang.Object value; }' 
     Maybe this is program field 'com.bumptech.glide.load.model.LazyHeaders$StringHeaderFactory { java.lang.String value; }' 
     Maybe this is program field 'com.facebook.GraphRequest$Attachment { java.lang.Object value; }' 
     Maybe this is program field 'com.facebook.internal.JsonUtil$JSONObjectEntry { java.lang.Object value; }' 
     Maybe this is program field 'com.facebook.internal.LockOnGetVariable { java.lang.Object value; }' 
     Maybe this is program field 'com.facebook.internal.Mutable { java.lang.Object value; }' 
     Maybe this is program field 'com.fasterxml.jackson.databind.deser.impl.BeanPropertyMap$Bucket { com.fasterxml.jackson.databind.deser.SettableBeanProperty value; }' 
     Maybe this is program field 'com.fasterxml.jackson.databind.deser.impl.PropertyValue { java.lang.Object value; }' 
     Maybe this is program field 'com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder$Linked { java.lang.Object value; }' 
     Maybe this is program field 'com.fasterxml.jackson.databind.ser.impl.JsonSerializerMap$Bucket { com.fasterxml.jackson.databind.JsonSerializer value; }' 
     Maybe this is program field 'com.fasterxml.jackson.databind.util.LinkedNode { java.lang.Object value; }' 
     Maybe this is program field 'com.google.android.gms.internal.zzaf$zze { int value; }' 
     Maybe this is program field 'com.google.android.gms.internal.zzsz$zze { java.lang.String value; }' 
     Maybe this is program field 'com.google.common.base.Functions$ConstantFunction { java.lang.Object value; }' 
     Maybe this is program field 'com.google.common.base.MoreObjects$ToStringHelper$ValueHolder { java.lang.Object value; }' 
     Maybe this is program field 'com.google.common.base.Objects$ToStringHelper$ValueHolder { java.lang.Object value; }' 
     Maybe this is program field 'com.google.common.base.Suppliers$ExpiringMemoizingSupplier { java.lang.Object value; }' 
     Maybe this is program field 'com.google.common.base.Suppliers$MemoizingSupplier { java.lang.Object value; }' 
     Maybe this is program field 'com.google.common.cache.LocalCache$WriteThroughEntry { java.lang.Object value; }' 
     Maybe this is program field 'com.google.common.cache.RemovalNotification { java.lang.Object value; }' 
     Maybe this is program field 'com.google.common.cache.Striped64$Cell { long value; }' 
     Maybe this is program field 'com.google.common.collect.ComputingConcurrentHashMap$ComputedReference { java.lang.Object value; }' 
     Maybe this is program field 'com.google.common.collect.Count { int value; }' 
     Maybe this is program field 'com.google.common.collect.ImmutableEntry { java.lang.Object value; }' 
     Maybe this is program field 'com.google.common.collect.LinkedListMultimap$Node { java.lang.Object value; }' 
     Maybe this is program field 'com.google.common.collect.MapMakerInternalMap$WriteThroughEntry { java.lang.Object value; }' 
     Maybe this is program field 'com.google.common.collect.Ordering$IncomparableValueException { java.lang.Object value; }' 
     Maybe this is program field 'com.google.common.collect.Tables$ImmutableCell { java.lang.Object value; }' 
     Maybe this is program field 'com.google.common.collect.TreeMultiset$Reference { java.lang.Object value; }' 
     Maybe this is program field 'com.google.common.collect.TreeRangeMap$RangeMapEntry { java.lang.Object value; }' 
     Maybe this is program field 'com.google.common.primitives.UnsignedInteger { int value; }' 
     Maybe this is program field 'com.google.common.primitives.UnsignedLong { long value; }' 
     Maybe this is program field 'com.google.common.util.concurrent.AbstractFuture$Sync { java.lang.Object value; }' 
     Maybe this is program field 'com.google.common.util.concurrent.AtomicDouble { long value; }' 
     Maybe this is program field 'com.google.common.util.concurrent.Futures$ImmediateSuccessfulCheckedFuture { java.lang.Object value; }' 
     Maybe this is program field 'com.google.common.util.concurrent.Futures$ImmediateSuccessfulFuture { java.lang.Object value; }' 
     Maybe this is program field 'com.google.gson.JsonPrimitive { java.lang.Object value; }' 
     Maybe this is program field 'com.google.gson.internal.LazilyParsedNumber { java.lang.String value; }' 
     Maybe this is program field 'com.google.gson.internal.LinkedHashTreeMap$Node { java.lang.Object value; }' 
     Maybe this is program field 'com.google.gson.internal.LinkedTreeMap$Node { java.lang.Object value; }' 
     Maybe this is program field 'com.google.zxing.aztec.encoder.SimpleToken { short value; }' 
     Maybe this is program field 'com.google.zxing.oned.rss.DataCharacter { int value; }' 
     Maybe this is program field 'com.google.zxing.oned.rss.FinderPattern { int value; }' 
     Maybe this is program field 'com.google.zxing.oned.rss.expanded.decoders.DecodedChar { char value; }' 
     Maybe this is program field 'com.google.zxing.pdf417.decoder.Codeword { int value; }' 
     Maybe this is program field 'com.viewpagerindicator.TitlePageIndicator$IndicatorStyle { int value; }' 
     Maybe this is program field 'com.viewpagerindicator.TitlePageIndicator$LinePosition { int value; }' 
     Maybe this is program field 'dagger.internal.codegen.writer.StringLiteral { java.lang.String value; }' 
     Maybe this is program field 'io.jsonwebtoken.SignatureAlgorithm { java.lang.String value; }' 
     Maybe this is library field 'android.R$attr { int value; }' 
     Maybe this is library field 'android.util.MutableBoolean { boolean value; }' 
     Maybe this is library field 'android.util.MutableByte { byte value; }' 
     Maybe this is library field 'android.util.MutableChar { char value; }' 
     Maybe this is library field 'android.util.MutableDouble { double value; }' 
     Maybe this is library field 'android.util.MutableFloat { float value; }' 
     Maybe this is library field 'android.util.MutableInt { int value; }' 
     Maybe this is library field 'android.util.MutableLong { long value; }' 
     Maybe this is library field 'android.util.MutableShort { short value; }' 
     Maybe this is library field 'android.view.animation.Animation$Description { float value; }' 
     Maybe this is library field 'java.sql.DriverPropertyInfo { java.lang.String value; }' 
Note: com.google.gson.internal.UnsafeAllocator accesses a declared field 'theUnsafe' dynamically 
     Maybe this is program field 'com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator { sun.misc.Unsafe theUnsafe; }' 
Note: there were 8 references to unknown classes. 
     You should check your configuration for typos. 
     (http://proguard.sourceforge.net/manual/troubleshooting.html#unknownclass) 
Note: there were 10 classes trying to access enclosing classes using reflection. 
     You should consider keeping the inner classes attributes 
     (using '-keepattributes InnerClasses'). 
     (http://proguard.sourceforge.net/manual/troubleshooting.html#attributes) 
Note: there were 3 classes trying to access enclosing methods using reflection. 
     You should consider keeping the enclosing method attributes 
     (using '-keepattributes InnerClasses,EnclosingMethod'). 
     (http://proguard.sourceforge.net/manual/troubleshooting.html#attributes) 
Note: there were 7 unresolved dynamic references to classes or interfaces. 
     You should check if you need to specify additional program jars. 
     (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass) 
Note: there were 4 accesses to class members by means of introspection. 
     You should consider explicitly keeping the mentioned class members 
     (using '-keep' or '-keepclassmembers'). 
     (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclassmember) 
Warning: there were 2458 unresolved references to classes or interfaces. 
     You may need to add missing library jars or update their versions. 
     If your code works fine without the missing classes, you can suppress 
     the warnings with '-dontwarn' options. 
     (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass) 
Warning: there were 1 unresolved references to program class members. 
     Your input classes appear to be inconsistent. 
     You may need to recompile the code. 
     (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedprogramclassmember) 
Warning: Exception while processing task java.io.IOException: Please correct the above warnings first. 
:app:transformClassesAndResourcesWithProguardForRelease FAILED 

FAILURE: Build failed with an exception. 

* What went wrong: 
Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'. 
> java.io.IOException: Please correct the above warnings first. 

* Try: 
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 

BUILD FAILED 
<b>Proguard rules</b> 

<pre> 
-keep class com.google.android.gms.** { *; } 
-dontwarn com.google.android.gms.** 
-dontwarn com.viewpagerindicator.* 
-dontwarn com.amazonaws.** 
-dontwarn sun.misc.Unsafe 

-dontnote com.google.vending.licensing.ILicensingService 
-dontnote com.android.vending.licensing.ILicensingService 

# google play 
-keep class * extends java.util.ListResourceBundle { 
    protected Object[][] getContents(); 
} 

-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable { 
    public static final *** NULL; 
} 

-keepnames @com.google.android.gms.common.annotation.KeepName class * 
-keepclassmembernames class * { 
    @com.google.android.gms.common.annotation.KeepName *; 
} 

-keepnames class * implements android.os.Parcelable { 
    public static final ** CREATOR; 
} 

##---------------Begin: proguard configuration for Gson ---------- 
# Gson uses generic type information stored in a class file when working with fields. Proguard 
# removes such information by default, so configure it to keep all of it. 
-keepattributes Signature 

# For using GSON @Expose annotation 
-keepattributes *Annotation* 

# Gson specific classes 
-keep class sun.misc.Unsafe { *; } 
#-keep class com.google.gson.stream.** { *; } 
# Application classes that will be serialized/deserialized over Gson 
# defualt 
-keep class com.sample.package.models.** { *; } # samople only cant public package right now 
##---------------End: proguard configuration for Gson ---------- 

-keep class com.viewpagerindicator.** { *; } 

-keepattributes SourceFile,LineNumberTable 

# facebook 
-keep class com.facebook.** { *; } 
-keepattributes Signature 
-dontwarn bolts.** 
-dontwarn com.facebook.** 

# Dagger 
-dontwarn dagger.internal.codegen.** 
-keepclassmembers,allowobfuscation class * { 
    @javax.inject.* *; 
    @dagger.* *; 
    <init>(); 
} 
-keep class dagger.* { *; } 
-keep class javax.inject.* { *; } 
-keep class * extends dagger.internal.Binding 
-keep class * extends dagger.internal.ModuleAdapter 
-keep class * extends dagger.internal.StaticInjection 

# Square 
-keep class butterknife.** { *; } 
-dontwarn butterknife.internal.** 
-keep class **$$ViewBinder { *; } 

-keepclasseswithmembernames class * { 
    @butterknife.* <fields>; 
} 

-keepclasseswithmembernames class * { 
    @butterknife.* <methods>; 
} 

-keepnames class * { @butterknife.Bind *;} 

-keep class com.google.gson 
-keep class Gson** 
-keepclassmembers class Gson** { 
    *; 
} 

+0

在帖子中包含錯誤而不是鏈接到外部圖像會更好。 – nateyolles

+0

@nateyolles我剛剛編輯..你能幫我嗎? – user6402354

回答

0

你可以試試這個

#GSON 
-keepattributes Signature 
-keepattributes *Annotation* 
-keep class sun.misc.Unsafe { *; } 
0

Proguard的爲GSON:

##---------------Begin: proguard configuration for Gson ---------- 
# Gson uses generic type information stored in a class file when working with fields. Proguard 
# removes such information by default, so configure it to keep all of it. 
-keepattributes Signature 


# Gson specific classes 
-keep class sun.misc.Unsafe { *; } 
#-keep class com.google.gson.stream.** { *; } 


# Application classes that will be serialized/deserialized over Gson 
-keep class com.google.gson.examples.android.model.** { *; } 

-keepattributes *Annotation* 
-keep class sun.misc.Unsafe { *; } 

##---------------End: proguard configuration for Gson ----------