didi / VirtualAPK

A powerful and lightweight plugin framework for Android
Apache License 2.0
8.99k stars 1.52k forks source link

Unable to start activity ComponentInfo{com.weidu.hostvirtualapk/com.didi.virtualapk.core.A$1}: java.lang.NullPointerException: #248

Open sdgSnow opened 6 years ago

sdgSnow commented 6 years ago

Process: com.weidu.hostvirtualapk, PID: 21747 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.weidu.hostvirtualapk/com.didi.virtualapk.core.A$1}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.Application.dispatchActivityCreated(android.app.Activity, android.os.Bundle)' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2758) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2819) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1558) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:163) at android.app.ActivityThread.main(ActivityThread.java:6396) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.Application.dispatchActivityCreated(android.app.Activity, android.os.Bundle)' on a null object reference at android.app.Activity.onCreate(Activity.java:1004) at android.support.v4.app.SupportActivity.onCreate(ComponentActivity.java:71) at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:325) at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:85) at com.dimeno.ques.wd.mvp.ui.activities.TestActivity.onCreate(TestActivity.java:12) at android.app.Activity.performCreate(Activity.java:6875) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119) at com.didi.virtualapk.internal.VAInstrumentation.callActivityOnCreate(VAInstrumentation.java:223) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2711) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2819)  at android.app.ActivityThread.-wrap12(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1558)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:163)  at android.app.ActivityThread.main(ActivityThread.java:6396)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)  08-03 14:40:48.381 21747-21747/com.weidu.hostvirtualapk E/Tinker.UncaughtHandler: TinkerUncaughtHandler catch exception:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.weidu.hostvirtualapk/com.didi.virtualapk.core.A$1}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.Application.dispatchActivityCreated(android.app.Activity, android.os.Bundle)' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2758) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2819) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1558) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:163) at android.app.ActivityThread.main(ActivityThread.java:6396) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.Application.dispatchActivityCreated(android.app.Activity, android.os.Bundle)' on a null object reference at android.app.Activity.onCreate(Activity.java:1004) at android.support.v4.app.SupportActivity.onCreate(ComponentActivity.java:71) at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:325) at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:85) at com.dimeno.ques.wd.mvp.ui.activities.TestActivity.onCreate(TestActivity.java:12) at android.app.Activity.performCreate(Activity.java:6875) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119) at com.didi.virtualapk.internal.VAInstrumentation.callActivityOnCreate(VAInstrumentation.java:223) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2711) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2819)  at android.app.ActivityThread.-wrap12(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1558)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:163)  at android.app.ActivityThread.main(ActivityThread.java:6396)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794) 

sdgSnow commented 6 years ago

我在宿主跳转到插件工程的时候就会崩溃闪退,报这个错,请问下这样的应该怎么解决,跪求

superqiaopu commented 6 years ago

请先查看相关Wiki: Demo 工程运行须知 提问必看 常见问题解答(不定时更新)

sdgSnow commented 6 years ago

这个wiki和issue里面都有类似提问,但是没有解决方案,跪求

Tanglonglong commented 5 years ago

请问这个是怎么解决的 我加载其它两个插件是好的 加载第三个插件 就报这个

darrenjh commented 5 years ago

这个问题你解决了吗老铁