调试Android应用程序到手机 [英] Debugging an Android app to the phone
问题描述
我已经通过了网页的 使用硬件设备 的。我的清单有
I've gone through the page Using Hardware Devices. My manifest has
<application android:icon="@drawable/icon"
android:label="@string/app_name"
android:debuggable="true">
我的手机拥有的菜单的 - >的设置的 - >的应用程序的 - >的发展的 - >的 USB调试的检查。
My phone has Menu -> Settings -> Applications -> Development -> USB Debugging checked.
我已经在控制面板上我的Windows XP 64位安装,安装的SDK安装给我的USB驱动程序的 Android的sdk_r05-WINDOWS \ Android的SDK-WINDOWS \ usb_driver
。所以,我的电脑不识别Android设备。
I have gone to the control panel on my Windows XP 64 bit installation and installed the USB drivers given to me by the SDK installer in android-sdk_r05-windows\android-sdk-windows\usb_driver
. So my computer does recognize the Android device.
不过..当我在Eclipse中运行一个应用程序,它仍然坚持打开它在模拟器,而不是我的电话。我该如何解决呢?
However.. when I run an app on Eclipse, it still insists on opening it up in an emulator rather than my phone. How can I fix that?
推荐答案
我拿起Android开发一遍,这是为我工作用的 HTC Hero的(2.1更新1)基于Eclipse(诉3.6(太阳神)< /一>,服务版本1):
I just picked up Android development again, and this is what worked for me using HTC Hero (2.1 update 1) on Eclipse (v. 3.6 (Helios), Service Release 1):
- 在启动的Eclipse
- 连接手机
- 确保USB调试启用
- 设置手机连接类型的 HTC同步的,
而不是只收取等
(您不必同步,但它必须是 在这种模式下。然后将一条消息 在任务栏显示说USB调试 连接或类似的东西。 然后,按照AlexVolovoy的 说明(右键单击 Eclipse项目 - >的运行方式的 - >的运行配置的 - >的目标的 - 选择 手动),你应该是好去。 不过,别忘了从接你的电话 目标列表。
- Start up Eclipse
- Connect the phone
- Ensure USB debugging is enabled
- Set phone connection type to HTC sync,
as opposed to charge only, etc.
(You don't have to sync, but it need to be in this mode. A message will then be displayed in the task bar saying USB debugging is connected or something similar. Then follow AlexVolovoy's instructions (Right click on the Eclipse project -> Run As -> Run Configuration -> Target - Choose manual) and you should be good to go. Just remember to pick your phone from the list of targets.
这篇关于调试Android应用程序到手机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!