简体   繁体   English

将调试器安装到无法在Netbeans中运行的Android设备(不是模拟器)

[英]Attatch debugger to Android Device not working in Netbeans (not emulator)

I cant seem to attach the debugger when trying to execute my code on Galaxy 2 T989. 尝试在Galaxy 2 T989上执行代码时,我似乎无法附加调试器。 I am using Netbeans with the standard Android development plugin. 我正在将Netbeans与标准Android开发插件一起使用。

When I try to attach the debugger, the dialog pops up in netbeans. 当我尝试连接调试器时,该对话框在netbeans中弹出。 There is no device shown (I am guessing its defaulting to my phone since it lets me select the process. I select the process (Not shown in the image), but when I try to click on ok, it does absolutely nothing. The dialog stays open and nothing changes. My phone still shows "Waiting for Debugger". 没有显示任何设备(我猜想它是手机的默认设置,因为它可以让我选择进程。我选择了进程(未在图片中显示),但是当我尝试单击ok时,它什么也没做。保持打开状态,没有任何变化。我的手机仍然显示“正在等待调试器”。

 //cant post image as I don't have enough points

I would much prefer to debug off my phone because I am dealing with sockets and would rather have real world simulation of the data being transferred. 我更喜欢调试手机,因为我正在处理套接字,而是希望对传输的数据进行真实的模拟。 I am using 4.0.3 SDK, code runs fine on my 2.3.5 on my phone, I have not tried it on my Prime yet. 我正在使用4.0.3 SDK,代码在我的手机上的2.3.5上运行良好,但尚未在Prime上尝试过。

http://i.stack.imgur.com/nZTeY.png http://i.stack.imgur.com/nZTeY.png

1) install usb_driver 1)安装usb_driver

2) set your device option on USB debugging 2)在USB调试中设置设备选项

For those coming by to solve this issue, I found the solution. 对于那些来解决这个问题的人,我找到了解决方案。 Its quite simple. 它很简单。 Go into your plugins menu from tools. 从工具进入您的插件菜单。 After you have done that, go into the installed tab and make sure your "User Installed Plugins" is marked as "active" (make sure the circle is green) 完成此操作后,进入“已安装”标签并确保将“用户安装的插件”标记为“活动”(确保圆圈为绿色)

I got it working by using ddms as a bridge between the device an netbeans. 我通过使用ddms作为netbeans设备之间的桥梁来使其工作。 You have to configure a local debugger port in ddms and make your netbeans connect to that port using a regular java debugger. 您必须在ddms中配置本地调试器端口,并使用常规的Java调试器使netbeans连接到该端口。 I have written a tutorial article on my blog. 在博客上写了一篇教程文章。

Phone Settings: 手机设置:

Settings->"Developer Options"->"Select USB Configuration" Select MIDI from the List. 设置->“开发人员选项”->“选择USB配置”从列表中选择MIDI。

Netbeans Settings Netbeans设置

Options->HTML/JS Tab->Mobile Platforms->Android SDK Location must be also selected correctly Android SDK Location is often: C:\\Users\\\\AppData\\Local\\Android\\Sdk 选项-> HTML / JS选项卡->移动平台-> Android SDK位置也必须正确选择Android SDK位置通常为:C:\\ Users \\\\ AppData \\ Local \\ Android \\ Sdk

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在仿真器上工作但不在真正的Android设备上 - Working on Emulator but not on the real Android device 后退按钮在模拟器上运行,但在Android设备中不运行 - back button is working on emulator but it is not working in device in android Android:文件在模拟器中工作,但在设备中出现错误? - Android: File working in Emulator but giving error in Device? MediaPlayer可在模拟器上运行,但不能在android中的实际设备上运行 - MediaPlayer working on emulator, but not on actual device in android Android套接字应用程序在模拟器上运行但不在设备上运行 - Android socket application running on emulator but not working on device Android App可在模拟器上运行,但在设备上启动时崩溃 - Android App working on Emulator but crashes at launch on device Android模拟器未在NetBeans上加载 - Android Emulator not loading on netbeans 我的Android应用程序在模拟器上运行,但无法在我的Android设备上运行 - My Android application runs on emulator but not working on my android device 当我的android应用程序在android设备/模拟器上运行时Jsoup无法正常工作 - Jsoup is not working when my android application is running on android device/emulator Netbeans Android模拟器未运行程序 - Netbeans Android emulator not running program
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM