如何调试BOOT_COMPLETE广播接收器的"强制关闭"崩溃?接收器、BOOT_COMPLETE、QUOT

2023-09-04 09:46:22 作者:生命是一场旅途

由于手机重新启动,从而从Eclipse调试器断开连接/ LogCat中,而它的启动起来,我怎么看到我的引导完整的广播接收器崩溃?

Since the phone restarts and thus gets disconnected from the Eclipse debugger/LogCat while it's booting up, how do I see where my boot complete broadcast receiver is crashing?

我执行的一些行动中的onReceive()我     公共类BootCompleteReceiver扩展的BroadcastReceiver {     ...     }

I am performing some actions in the onReceive() of my public class BootCompleteReceiver extends BroadcastReceiver { ... }

这是崩溃,并弹出一个强制关闭对话框手机启动时。如何调试这一点,看看问题出在哪里?

This is crashing and popping up a force close dialog when the phone boots. How do I debug this and see where the problem is?

这个问题也适用于任何调试 BOOT_COMPLETE 广播接收器。

The question holds true for debugging any BOOT_COMPLETE broadcast receivers.

谢谢!

修改

是的,我们能看到的手机LogCat中的系统日志被启动了,但我的应用程序Log.d(TAG,引导完成),必须等待,直到它(的onReceive)被触发,而是由当时的应用程序崩溃因为这个问题是某处接收机本身。应用程序崩溃之前,我可以登录任何东西。此外,我不能使用,在调试模式下运行的电话多数民众赞成重新启动......

Yes, we can see the system logs in LogCat as the phone is booting up but my app Log.d(TAG,"Boot completed") has to wait till it (onReceive) gets triggered but by that time the app crashes because the problem is somewhere in the receiver itself. The app crashes before I can log anything. Also, I cannot use "Run in Debug mode" for a phone that's restarting...

推荐答案

检查你的意图的行动和你recieving,他们可能会为空,可以是一个空指针异常。包

check your Intent's actions and bundles you are recieving ,they may null and can be a null pointer exception.