简体   繁体   English

使用连接到 usb 的设备运行 android

[英]Running android using device connected to usb

can I somehow run the android project currently running using my phone that is connected via usb?我可以使用通过 usb 连接的手机以某种方式运行当前正在运行的 android 项目吗? the android emulator starts pretty slow so i think it would be better to use my device android 仿真器启动速度很慢,所以我认为使用我的设备会更好

  1. install the proper usb driver (this might not be necessary on a mac)安装正确的 usb 驱动程序(这在 Mac 上可能不是必需的)
  2. turn on Developer mode on your device ( settings->applications->development )在您的设备上打开开发者模式(设置->应用程序->开发)
  3. plug in the device to your computer将设备插入计算机
  4. wait for the device to show up on the devices list ( [android-sdk-folder/tools/]adb devices or check out the DDMS panel in eclipse )等待设备显示在设备列表中([android-sdk-folder/tools/]adb 设备或查看 eclipse 中的 DDMS 面板)
  5. run the app..运行应用程序..

U will have to install the required driver.. and connect the phone.. the adb will get installed..now run the app manually(in run configuration).. there u can see all device in which u can run your app.. select yourr device.. and app will run in the phone.你必须安装所需的驱动程序..并连接手机.. adb 将被安装..现在手动运行应用程序(在运行配置中)..在那里你可以看到你可以运行你的应用程序的所有设备.. select 您的设备.. 应用程序将在手机中运行。

If you are developing with eclipse the ADT plugin is your friend.如果您使用 eclipse 进行开发,ADT 插件是您的朋友。 To run/debug your app on your phone you have to download the drivers for your phone and install them.要在手机上运行/调试您的应用程序,您必须下载手机的驱动程序并安装它们。 Then your phone should appear as an emulator in the DDSM perspective inside eclipse.然后您的手机应该在 eclipse 内的 DDSM 透视图中显示为模拟器。 When you now run/debug your app, eclipse will choose your phone as the target.当您现在运行/调试您的应用程序时,eclipse 将选择您的手机作为目标。

PS You have to enable usb debugging: PS你必须启用usb调试:

  1. From the home screen, press the Menu button below the screen.在主屏幕中,按屏幕下方的菜单按钮。

  2. Tap the Settings option.点击设置选项。

  3. Choose Applications.选择应用程序。

  4. Select Development. Select 开发。

  5. Check the box for USB Debugging to turn it on.选中 USB 调试框以将其打开。

A complete description for all platforms (Windows, Linux, Mac) of how to use a real device for debugging can be found here关于如何使用真实设备进行调试的所有平台(Windows、Linux、Mac)的完整描述可以在这里找到
http://developer.android.com/guide/developing/device.html http://developer.android.com/guide/developing/device.html

A list for all common manufacturers of where to get the USB driver from is located here有关从何处获取 USB 驱动程序的所有常见制造商的列表位于此处
http://developer.android.com/sdk/oem-usb.html http://developer.android.com/sdk/oem-usb.html

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM