简体   繁体   English

如何使用android studio设置运行设备?

[英]How to set a running device with android studio?

I want to connect an android device to test my application directly from my environment android studio 我想连接一个android设备以直接从我的环境android studio测试我的应用程序

android studio - http://developer.android.com/sdk/index.html android studio- http://developer.android.com/sdk/index.html

I have a samsung galaxy s5 device, I've connected it to usb, I've installed this drivers: 我有一个三星galaxy s5设备,已将其连接到USB,已经安装了以下驱动程序:

http://developer.samsung.com/technical-doc/view.do?v=T000000117 http://developer.samsung.com/technical-doc/view.do?v=T000000117

and there are said that: 有人说:

The USB Driver for Windows is available for download in this page. You need the driver only if you are developing on Windows and want to connect a Samsung android device to your development environment over USB.

so, in my windows 7 device mananger I see that in the section "portable devices" the phone is listed, and its name is identified, but in the android studio when I run my application, then I should select if a want to run it with a virtual or real device, so in the list of running devices in android studio, my device is not listed, I 've tried to restart the pc, but no results, can anyone tell me what I'am doing wrong? 因此,在我的Windows 7设备管理员中,我看到在“便携式设备”部分中列出了电话,并确定了其名称,但是在android studio中,当我运行应用程序时,应该选择是否要运行它使用虚拟或真实设备,因此在android studio中正在运行的设备列表中,未列出我的设备,我试图重新启动PC,但没有结果,有人可以告诉我我做错了什么吗? I can't understand... 我听不懂

I guess the drivers are not compatible. 我猜驱动程序不兼容。 Try installing the drivers that come with android sdk. 尝试安装android sdk随附的驱动程序。

To install the Android USB driver on Windows 7 for the first time: 首次在Windows 7上安装Android USB驱动程序:

  1. Connect your Android-powered device to your computer's USB port. 将您的Android设备连接到计算机的USB端口。

  2. Right-click on Computer from your desktop or Windows Explorer, and select Manage. 在桌面或Windows资源管理器上右键单击“计算机”,然后选择“管理”。

  3. Select Devices in the left pane. 在左窗格中选择设备。 Locate and expand Other device in the right pane. 在右窗格中找到并展开“其他设备”。

  4. Right-click the device name (such as Nexus S) and select Update Driver Software.This will launch the Hardware Update Wizard. 右键单击设备名称(例如Nexus S),然后选择更新驱动程序软件。这将启动硬件更新向导。

  5. Select Browse my computer for driver software and click Next. 选择浏览我的计算机以获取驱动程序软件,然后单击下一步。
  6. Click Browse and locate the USB driver folder. 单击浏览并找到USB驱动程序文件夹。 (The Google USB Driver is located in \\extras\\google\\usb_driver.) (Google USB驱动程序位于\\ extras \\ google \\ usb_driver中。)
  7. Click Next to install the driver. 单击“下一步”安装驱动程序。

Or, to upgrade an existing Android USB driver on Windows 7 with the new driver: 或者,使用新驱动程序升级Windows 7上的现有Android USB驱动程序:

  1. Connect your Android-powered device to your computer's USB port. 将您的Android设备连接到计算机的USB端口。
  2. Right-click on Computer from your desktop or Windows Explorer, and select Manage. 在桌面或Windows资源管理器上右键单击“计算机”,然后选择“管理”。
  3. Select Device Manager in the left pane of the Computer Management window. 在“计算机管理”窗口的左窗格中选择“设备管理器”。
  4. Locate and expand Android Phone in the right pane. 在右窗格中找到并展开Android Phone。
  5. Right-click Android Composite ADB Interface and select Update Driver. 右键单击“ Android Composite ADB Interface”,然后选择“ Update Driver”。 This will launch the Hardware Update Wizard. 这将启动硬件更新向导。
  6. Select Install from a list or specific location and click Next. 选择从列表或特定位置安装,然后单击下一步。
  7. Select Search for the best driver in these locations; 选择在这些位置搜索最佳驱动程序; un-check Search removable media; 取消选中搜索可移动媒体; and check Include this location in the search. 并选中在搜索中包括此位置。
  8. Click Browse and locate the USB driver folder. 单击浏览并找到USB驱动程序文件夹。 (The Google USB Driver is located in \\extras\\google\\usb_driver.) (Google USB驱动程序位于\\ extras \\ google \\ usb_driver中。)
  9. Click Next to upgrade the driver. 单击“下一步”升级驱动程序。

Before Android Studio, you have to setup Android SDK to your Windows and make ADB work everywhere. 在使用Android Studio之前,您必须在Windows上安装Android SDK,并使ADB在任何地方都能正常工作。 However, now life is a lot easier when you use Android Studio since everything includes in it, you just need to enable USB Debugging on your phone and Run. 但是,由于使用了Android Studio,因此现在生活变得更加轻松,因为其中包含了所有内容,您只需要在手机上启用USB调试并运行即可。

Follow this link: Run on a Real Device 单击此链接: 在真实设备上运行

You still doesn't work, try to follow step by step on that page. 您仍然无法使用,请尝试按照该页面上的步骤进行操作。

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

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