Closed 1136346879 closed 4 years ago
我这边用 gtihub上的demo 用1.9.14.7 出现的是一样的问题。麻烦看看是什么问题导致的!!! 谢谢大佬 ![Uploading image.png…]()
github demo运行错误堆栈信息:
Process: tinker.sample.android, PID: 8292
java.lang.RuntimeException: Unable to instantiate application tinker.sample.android.app.SampleApplication: java.lang.ClassNotFoundException: Didn't find class "tinker.sample.android.app.SampleApplication" on path: DexPathList[[zip file "/data/app/tinker.sample.android-13gicSoD7HUZMN-KSESMIw==/base.apk"],nativeLibraryDirectories=[/data/app/tinker.sample.android-13gicSoD7HUZMN-KSESMIw==/lib/arm64, /system/lib64]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:1084)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6171)
at android.app.ActivityThread.access$1200(ActivityThread.java:236)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1851)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:7042)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:536)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:868)
Caused by: java.lang.ClassNotFoundException: Didn't find class "tinker.sample.android.app.SampleApplication" on path: DexPathList[[zip file "/data/app/tinker.sample.android-13gicSoD7HUZMN-KSESMIw==/base.apk"],nativeLibraryDirectories=[/data/app/tinker.sample.android-13gicSoD7HUZMN-KSESMIw==/lib/arm64, /system/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.AppComponentFactory.instantiateApplication(AppComponentFactory.java:50)
at androidx.core.app.CoreComponentFactory.instantiateApplication(CoreComponentFactory.java:47)
at android.app.Instrumentation.newApplication(Instrumentation.java:1124)
at android.app.LoadedApk.makeApplication(LoadedApk.java:1076)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6171)
at android.app.ActivityThread.access$1200(ActivityThread.java:236)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1851)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:7042)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:536)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:868)
把这个
annotationProcessor("com.tencent.tinker:tinker-android-anno-support:${TINKER_VERSION}") { changing = true }
改成
annotationProcessor("com.tencent.tinker:tinker-android-anno:${TINKER_VERSION}") { changing = true }
不要带support 不然生成不了那个SampleApplication的类
可以了 谢谢大佬
Issue/提问须知
在提交issue之前,我们应该先查询是否已经有相关的issue以及常见问题。提交issue时,我们需要写明issue的原因,以及编译或运行过程的日志(加载进程以及Patch进程)。issue需要以下面的格式: