Meituan-Dianping / Robust

Robust is an Android HotFix solution with high compatibility and high stability. Robust can fix bugs immediately without a reboot.
Apache License 2.0
4.41k stars 806 forks source link

第一次加载补丁包成功,第二次启动app崩溃 #332

Closed kevintkm closed 5 years ago

kevintkm commented 5 years ago

异常类型:第一次加载补丁包成功,第二次启动app崩溃

手机型号:所有机型

手机系统版本:Android 5.0

Robust版本 :0.4.87

Gradle版本:如:2.0

系统:如:window

堆栈/日志:

-23 20:06:16.756 2792-2885/com.test.mobile.goldshopkeeper E/RobustCallBack: exceptionNotify where: class:PatchExecutor method:patch line:163 java.lang.ExceptionInInitializerError at java.lang.reflect.Field.set(Native Method) at java.lang.reflect.Field.set(Field.java:557) at com.meituan.robust.PatchExecutor.patch(Proguard:150) at com.meituan.robust.PatchExecutor.applyPatchList(Proguard:63) at com.meituan.robust.PatchExecutor.run(Proguard:33) Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() at android.os.Handler.(Handler.java:209) at android.os.Handler.(Handler.java:123) at android.app.Activity.(Activity.java:803) at android.support.v4.app.SupportActivity.(Proguard:31) at android.support.v4.app.BaseFragmentActivityApi14.(Proguard:28) at android.support.v4.app.BaseFragmentActivityApi16.(Proguard:34) at android.support.v4.app.FragmentActivity.(Proguard:65) at com.test.mobile.goldshopkeeper.TestActivity.(Proguard:183) at com.test.mobile.goldshopkeeper.base.entrance.ui.TestTabActivity.(Proguard:40) at com.test.mobile.goldshopkeeper.base.entrance.ui.MainActivity.(Proguard:205) at com.test.mobile.goldshopkeeper.base.entrance.ui.MainActivity.(Proguard:203) at java.lang.reflect.Field.set(Native Method) at java.lang.reflect.Field.set(Field.java:557) at com.meituan.robust.PatchExecutor.patch(Proguard:150) at com.meituan.robust.PatchExecutor.applyPatchList(Proguard:63) at com.meituan.robust.PatchExecutor.run(Proguard:33)

hedex commented 5 years ago

Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()

hedex commented 5 years ago

问题已经定位,是MainActivity有静态变量的写法问题