TinkerPatch / tinkerpatch-sdk

TinkerPatch SDK
http://tinkerpatch.com
MIT License
294 stars 56 forks source link

自己项目4.4手机直接闪退,5.0以上手机都可以。但是让4.4手机跑demo又是正常的 #153

Closed YangKee closed 5 years ago

YangKee commented 5 years ago

E/Tinker.UncaughtHandler: TinkerUncaughtHandler catch exception:java.lang.RuntimeException: Unable to instantiate application com.casstime.ec.SampleApplication: com.tencent.tinker.loader.TinkerRuntimeException: Tinker Exception:fail to create inline fence instance. at android.app.LoadedApk.makeApplication(LoadedApk.java:507) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4566) at android.app.ActivityThread.access$1500(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1402) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:5351) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:829) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:645) at dalvik.system.NativeStart.main(Native Method) Caused by: com.tencent.tinker.loader.TinkerRuntimeException: Tinker Exception:fail to create inline fence instance. at com.tencent.tinker.loader.app.TinkerApplication.createInlineFence(TinkerApplication.java:118) at com.tencent.tinker.loader.app.TinkerApplication.onBaseContextAttached(TinkerApplication.java:127) at com.tencent.tinker.loader.app.TinkerApplication.attachBaseContext(TinkerApplication.java:146) at android.app.Application.attach(Application.java:181) at android.app.Instrumentation.newApplication(Instrumentation.java:993) at android.app.Instrumentation.newApplication(Instrumentation.java:977) at android.app.LoadedApk.makeApplication(LoadedApk.java:502) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4566)  at android.app.ActivityThread.access$1500(ActivityThread.java:151)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1402)  at android.os.Handler.dispatchMessage(Handler.java:110)  at android.os.Looper.loop(Looper.java:193)  at android.app.ActivityThread.main(ActivityThread.java:5351)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:515)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:829)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:645)  at dalvik.system.NativeStart.main(Native Method)  Caused by: java.lang.ClassNotFoundException: com.tencent.tinker.entry.TinkerApplicationInlineFence at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:251) at com.tencent.tinker.loader.app.TinkerApplication.createInlineFence(TinkerApplication.java:108) at com.tencent.tinker.loader.app.TinkerApplication.onBaseContextAttached(TinkerApplication.java:127)  at com.tencent.tinker.loader.app.TinkerApplication.attachBaseContext(TinkerApplication.java:146)  at android.app.Application.attach(Application.java:181)  at android.app.Instrumentation.newApplication(Instrumentation.java:993)  at android.app.Instrumentation.newApplication(Instrumentation.java:977)  at android.app.LoadedApk.makeApplication(LoadedApk.java:502)  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4566)  at android.app.ActivityThread.access$1500(ActivityThread.java:151)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1402)  at android.os.Handler.dispatchMessage(Handler.java:110)  at android.os.Looper.loop(Looper.java:193)  at android.app.ActivityThread.main(ActivityThread.java:5351)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:515)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:829)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:645)  at dalvik.system.NativeStart.main(Native Method)  Caused by: java.lang.VerifyError: com/tencent/tinker/entry/TinkerApplicationInlineFence at java.lang.Class.classForName(Native Method)  at java.lang.Class.forName(Class.java:251)  at com.tencent.tinker.loader.app.TinkerApplication.createInlineFence(TinkerApplication.java:108)  at com.tencent.tinker.loader.app.TinkerApplication.onBaseContextAttached(TinkerApplication.java:127)  at com.tencent.tinker.loader.app.TinkerApplication.attachBaseContext(TinkerApplication.java:146)  at android.app.Application.attach(Application.java:181)  at android.app.Instrumentation.newApplication(Instrumentation.java:993)  at android.app.Instrumentation.newApplication(Instrumentation.java:977)  at android.app.LoadedApk.makeApplication(LoadedApk.java:502)  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4566)  at android.app.ActivityThread.access$1500(ActivityThread.java:151)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1402)  at android.os.Handler.dispatchMessage(Handler.java:110)  at android.os.Looper.loop(Looper.java:193)  at android.app.ActivityThread.main(ActivityThread.java:5351)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:515)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:829)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:645)  at dalvik.system.NativeStart.main(Native Method) 

simpleton commented 5 years ago

可是尝试一下 1.2.14.3版本 https://bintray.com/simsun/maven/tinkerpatch-android-sdk/1.2.14.3

YangKee commented 5 years ago

查看了build/legacy_multidex_main_dex_list/.../mainDexList.txt
tencent/tinker相关的类都有就是少了TinkerApplicationInlineFence,手动加进去就好了