Tencent / tinker

Tinker is a hot-fix solution library for Android, it supports dex, library and resources update without reinstall apk.
Other
17.11k stars 3.33k forks source link

1.9.14.10报错java.lang.NoSuchMethodError: No direct method <init>(ILjava/lang/String;Ljava/lang/String;Z)V in class Lcom/tencent/tinker/loader/app/TinkerApplication; or its super classes (declaration of 'com.tencent.tinker.loader.app.TinkerApplication' appears #1498

Open liangdong9676 opened 3 years ago

liangdong9676 commented 3 years ago

异常类型:app运行时异常/编译异常

手机型号:华为Mate8

手机系统版本:9.0

tinker版本:1.9.14.10

gradle版本:4.6

是否使用热更新SDK: Bugly SDK

系统:windows

堆栈/日志:

java.lang.NoSuchMethodError: No direct method (ILjava/lang/String;Ljava/lang/String;Z)V in class Lcom/tencent/tinker/loader/app/TinkerApplication; or its super classes (declaration of 'com.tencent.tinker.loader.app.TinkerApplication' appears in /data/app/com.guangzhou.yanjiusuooa-aC5PzQ53AjFKvNoN2sn18Q==/base.apk) at com.tencent.bugly.beta.tinker.TinkerPatchReflectApplication.(BUGLY:44) at java.lang.Class.newInstance(Native Method) at android.app.Instrumentation.newApplication(Instrumentation.java:1104) at android.app.Instrumentation.newApplication(Instrumentation.java:1089) at android.app.LoadedApk.makeApplication(LoadedApk.java:1053) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6590) at android.app.ActivityThread.-wrap2(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066) at android.os.Handler.dispatchMessage(Handler.java:108) at android.os.Looper.loop(Looper.java:166) at android.app.ActivityThread.main(ActivityThread.java:7529) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)

liangdong9676 commented 3 years ago

官方说得好清楚了。。是不能用自己的Application了。 enableProxyApplication=为true就是无需改造Application,但官方不再维护,bugly只能用到 1.4.5 + 3.7.500 + 1.9.14.7版本。

1.9.14.8和以后的版本,需集成SampleApplicationLike。

目前最新是 api 'com.tencent.bugly:crashreport_upgrade:1.5.0' api 'com.tencent.bugly:nativecrashreport:3.7.700' api 'com.tencent.tinker:tinker-android-lib:1.9.14.10'

beiguancyc commented 3 years ago

官方说得好清楚了。。是不能用自己的Application了。 enableProxyApplication=为true就是无需改造Application,但官方不再维护,bugly只能用到 1.4.5 + 3.7.500 + 1.9.14.7版本。

1.9.14.8和以后的版本,需集成SampleApplicationLike。

目前最新是 api 'com.tencent.bugly:crashreport_upgrade:1.5.0' api 'com.tencent.bugly:nativecrashreport:3.7.700' api 'com.tencent.tinker:tinker-android-lib:1.9.14.10'

您好,请问官方在哪里说明的这个问题?我找了半天没找到

yanghuiyu39 commented 3 years ago

官方说得好清楚了。。是不能用自己的Application了。 enableProxyApplication=为true就是无需改造Application,但官方不再维护,bugly只能用到 1.4.5 + 3.7.500 + 1.9.14.7版本。 1.9.14.8和以后的版本,需集成SampleApplicationLike。 目前最新是 api 'com.tencent.bugly:crashreport_upgrade:1.5.0' api 'com.tencent.bugly:nativecrashreport:3.7.700' api 'com.tencent.tinker:tinker-android-lib:1.9.14.10'

您好,请问官方在哪里说明的这个问题?我找了半天没找到

适配SampleApplicationLike 方式: https://bugly.qq.com/docs/user-guide/instruction-manual-android-hotfix/?v=20200622202242#enableproxyapplication-false

CoderNo89757 commented 3 years ago

这个问题已经在1.9.14.13中修复了,https://github.com/Tencent/tinker/releases/tag/v1.9.14.13