AndroidStudio代码混淆常见错误Missing type parameter.

问题一

1894 java.lang.NoSuchMethodError
No static method newPullParser()Lorg/xmlpull/v1/a; in class Landroid/util/Xml; or its super classes (declaration of ‘android.util.Xml’ appears in /system/framework/framework.jar)
com.ta.utdid2.c.a.e.void a(java.util.Map,java.io.OutputStream)(Unknown Source)

解决办法:
-dontwarn org.xmlpull.v1.XmlPullParser
-dontwarn org.xmlpull.v1.XmlSerializer
-keep class org.xmlpull.v1.* {;}

问题二

1896 java.lang.RuntimeException
Missing type parameter.
com.google.gson.reflect.TypeToken.java.lang.reflect.Type getSuperclassTypeParameter(java.lang.Class)(Unknown Source)

解决办法:
-keepattributes Signature
-keep class com.google.gson.stream.* { ; }
-keep class com.google.gson.examples.android.model.* { ; }
-dontwarn com.google.gson.**
-keep class com.google.gson.* { ;}
-keep class org.json.* {;}

一定不要忘了-keepattributes Signature这一句

你可能感兴趣的:(Android,Tools)