我收到一个错误“无法实例化活动组件信息。”我尝试了所有可能的解决方案,但均无效果

时间:2018-07-16 08:03:35

标签: android-intent

  

07-16 10:07:56.830 29532-29532 / com.example.dedan.digitalreceipts   E / AndroidRuntime:致命异常:main       流程:com.example.dedan.digitalreceipts,PID:29532       java.lang.RuntimeException:无法实例化活动ComponentInfo {com.example.dedan.digitalreceipts / com.example.dedan.digitalreceipts.createReceipt}:   java.lang.NullPointerException:尝试调用虚拟方法   上的“ android.view.Window $ Callback android.view.Window.getCallback()”   空对象引用           在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2371)           在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2522)           在android.app.ActivityThread.access $ 800(ActivityThread.java:167)           在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1417)           在android.os.Handler.dispatchMessage(Handler.java:111)           在android.os.Looper.loop(Looper.java:194)           在android.app.ActivityThread.main(ActivityThread.java:5537)           在java.lang.reflect.Method.invoke(本机方法)           在java.lang.reflect.Method.invoke(Method.java:372)           在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:956)           在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:751)        原因:java.lang.NullPointerException:尝试调用虚拟方法'android.view.Window $ Callback   空对象引用上的android.view.Window.getCallback()'           在android.support.v7.app.AppCompatDelegateImpl。(AppCompatDelegateImpl.java:247)           在android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:182)           在android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:520)           在android.support.v7.app.AppCompatActivity.findViewById(AppCompatActivity.java:191)           在com.example.dedan.digitalreceipts.createReceipt。(createReceipt.java:24)           在java.lang.reflect.Constructor.newInstance(本地方法)           在java.lang.Class.newInstance(Class.java:1572)           在android.app.Instrumentation.newActivity(Instrumentation.java:1070)           在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2361)           在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2522)           在android.app.ActivityThread.access $ 800(ActivityThread.java:167)           在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1417)           在android.os.Handler.dispatchMessage(Handler.java:111)           在android.os.Looper.loop(Looper.java:194)           在android.app.ActivityThread.main(ActivityThread.java:5537)           在java.lang.reflect.Method.invoke(本机方法)           在java.lang.reflect.Method.invoke(Method.java:372)           在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:956)           在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:751)

0 个答案:

没有答案