线上app出现奇葩崩溃
下面是崩溃日志
UncaughtException detected: java.lang.NoSuchMethodError: No static method asAttributeSet(Lorg/xmlpull/v1/a;)Landroid/util/AttributeSet; in class Landroid/util/Xml; or its super classes (declaration of 'android.util.Xml' appears in /system/framework/framework.jar)
at android.support.v7.widget.g.d(AppCompatDrawableManager.java:348)
at android.support.v7.widget.g.a(AppCompatDrawableManager.java:195)
at android.support.v7.widget.g.a(AppCompatDrawableManager.java:188)
at android.support.v7.widget.g.f(AppCompatDrawableManager.java:755)
at android.support.v7.widget.g.a(AppCompatDrawableManager.java:193)
at android.support.v7.widget.au.b(TintTypedArray.java:87)
at android.support.v7.app.d.<init>(AppCompatDelegateImplBase.java:128)
at android.support.v7.app.AppCompatDelegateImplV9.<init>(AppCompatDelegateImplV9.java:149)
at android.support.v7.app.f.<init>(AppCompatDelegateImplV11.java:29)
at android.support.v7.app.g.<init>(AppCompatDelegateImplV14.java:54)
at android.support.v7.app.AppCompatDelegate.a(AppCompatDelegate.java:202)
at android.support.v7.app.AppCompatDelegate.a(AppCompatDelegate.java:183)
at android.support.v7.app.b.j(AppCompatActivity.java:519)
at android.support.v7.app.b.onCreate(AppCompatActivity.java:70)
at com.qihoo360.replugin.b.a.b.onCreate(Unknown Source)
at sina.com.cn.courseplugin.ui.baseCommon.b.onCreate(CourseBaseActivity.java:41)
at sina.com.cn.courseplugin.ui.activity.PlayerCourseActivity.onCreate(PlayerCourseActivity.java:77)
at android.app.Activity.performCreate(Activity.java:6156)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2508)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2659)
at android.app.ActivityThread.access$1000(ActivityThread.java:169)
at android.app.ActivityThread$H.han
具体报错
java.lang.NoSuchMethodError: No static method
asAttributeSet(Lorg/xmlpull/v1/a;)Landroid/util/AttributeSet; in class
Landroid/util/Xml; or its super classes (declaration of 'android.util.Xml'
appears in /system/framework/framework.jar)
咋一看有点找不到头脑,不过看到都是 at android.support.v7.widget.g.d 开头的包名,就应该是混淆问题了,搜了一下确实就是混淆问题
解决办法
-dontwarn org.xmlpull.v1.XmlPullParser
-dontwarn org.xmlpull.v1.XmlSerializer
-keep class org.xmlpull.v1.* {*;}
完美解决