【发布时间】:2013-09-24 19:54:49
【问题描述】:
我有一个 Android Widget 应用程序。它是来自this page 的应用程序(我刚刚下载了源代码)。
为了调试这个小部件,我使用this tutorial。
我在代码中放了一个断点(如下提供)。
public static void pushWidgetUpdate(Context context, RemoteViews remoteViews) {
Log.d("message", "fortunately, we have come to this point");
ComponentName myWidget = new ComponentName(context, MyWidgetProvider.class); //breakpoint is here!
AppWidgetManager manager = AppWidgetManager.getInstance(context);
manager.updateAppWidget(myWidget, remoteViews);
}
当我开始调试过程时,绿色的调试行像往常一样显示在带有断点的行上。但是几秒钟后它消失了,我看到小部件(或调试过程,甚至手机本身的过程)已被终止。在 DDMS 透视图中,该进程不再出现在进程列表中。
为什么调试器会突然停止?
【问题讨论】:
标签: java android eclipse debugging android-widget