在物理设备中调试 android 应用程序时出现 NPE

NPE when debugging android app in physical device

我已经设置了我的设备驱动程序,eclipse 可以毫无问题地找到它,我可以在我的 phone 中执行应用程序,也可以在 Chrome 中调试视图,但是当我尝试Debug as > Android application 我可以看到应用程序在设备中启动,它尝试附加调试器,然后我总是收到此错误:

2015-02-23 10:58:31 - ddms] null
java.lang.NullPointerException
at org.eclipse.debug.internal.ui.DebugUIPlugin.launchInBackground(DebugUIPlugin.java:1292)
at org.eclipse.debug.ui.DebugUITools.launch(DebugUITools.java:766)
at com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.debugRunningApp(AndroidLaunchController.java:178)
at com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.clientChanged(AndroidLaunchController.java:1749)
at com.android.ddmlib.AndroidDebugBridge.clientChanged(AndroidDebugBridge.java:926)
at com.android.ddmlib.Device.update(Device.java:775)
at com.android.ddmlib.Client.update(Client.java:936)
at com.android.ddmlib.HandleHello.handleHELO(HandleHello.java:175)
at com.android.ddmlib.HandleHello.handleChunk(HandleHello.java:81)
at com.android.ddmlib.MonitorThread.callHandler(MonitorThread.java:414)
at com.android.ddmlib.MonitorThread.processClientActivity(MonitorThread.java:336)
at com.android.ddmlib.MonitorThread.run(MonitorThread.java:263)

有什么想法吗?

这似乎是 Eclipse / Android 问题 20990 的示例。问题跟踪器并不表示有可用的修复程序,但其中一项后续行动提出了一些可能的解决方法。

Eclipse 中相关的解决方法/Android 问题 20990 对我有效。

this does not seem to occur upon first launch. i have my launch config set to "Always Ask" for the device; this seems to occur either as a result of or as a reason for that dialog not appearing on some of my attempts to re-launch.