阿里熱修復SophixStubApplication中java.lang.ClassNotFoundException引起的閃退
阿新 • • 發佈:2019-02-10
ava.lang.ClassNotFoundException
at com.taobao.sophix.b.a.a.a.findClass(Sophix:199)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at com.taobao.sophix.a.c.n(Sophix:637)
at com.taobao.sophix.a.c.a(Sophix:131)
at com.taobao.sophix.a.e.initialize(Sophix:71)
at com.x.x.utils.SophixStubApplication.initSophix(SophixStubApplication.java:56)
at com.x.x.utils.SophixStubApplication.attachBaseContext(SophixStubApplication.java:30)
at android.app.Application.attach(Application.java:199)
at android.app.Instrumentation.newApplication(Instrumentation.java:1009)
at android.app.Instrumentation.newApplication(Instrumentation.java:993)
at android.app.LoadedApk.makeApplication(LoadedApk.java:596)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5184)
at android.app.ActivityThread.access$1600(ActivityThread.java:191)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1678)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:6009)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:840)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:730)
Suppressed: java.lang.ClassNotFoundException: com.xncredit.xdy.utils.SophixStubApplication$RealApplicationStub
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 19 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
原因:冷啟動修復在執行時開啟了Instant Run
關閉Android Studio中的Instant Run即可,
Preferences->Instant Run,關閉Enable勾選