Android studio 没有在“选择设备”下列出我的手机
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25225927/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Android studio doesn't list my phone under "Choose Device"
提问by Rollie
Just starting out with Android development; have a Nexus 5 bought in Japan, but with English version of android (presumably shouldn't matter). I installed Android Studio on Windows 8.1 to try making an app, but now I don't see my phone under "Choose Device". I've enabled developer mode and selected 'USB debugging'. Is there something else I need to do to get Android Studio to see my connected device?
刚开始 Android 开发;在日本购买了 Nexus 5,但有英文版的 android(大概应该无关紧要)。我在 Windows 8.1 上安装了 Android Studio 以尝试制作应用程序,但现在我在“选择设备”下看不到我的手机。我启用了开发者模式并选择了“USB 调试”。我还需要做些什么才能让 Android Studio 看到我连接的设备?
回答by MeowMeow
Have you installed drivers for the phone? http://developer.android.com/sdk/win-usb.html
你有没有安装手机的驱动程序?http://developer.android.com/sdk/win-usb.html
It appears that the the sdk does not "install" the USB drivers. You can select that usb drivers in the sdk to see the file location, open that up, and right click to install the driver yourself.
sdk 似乎没有“安装”USB 驱动程序。您可以在sdk中选择那个usb驱动程序来查看文件位置,打开它,然后右键单击自己安装驱动程序。
- File -> Settings -> Android SDK -> SDK Tools -> Google USB Driver -> Right click -> Install
- Ensure that Google USB driver is checked.
- 文件 -> 设置 -> Android SDK -> SDK 工具 -> Google USB 驱动程序 -> 右键单击 -> 安装
- 确保选中 Google USB 驱动程序。
If above doesn't work, @Abir Hasan appears to have another method in answers below.
如果上述方法不起作用,@Abir Hasan 在下面的答案中似乎有另一种方法。
回答by John
I've had this problem many times before with my Galaxy Nexus. Despite having the Android SDK's USB drivers installed, it did not seem to suffice.
我之前在 Galaxy Nexus 上遇到过这个问题很多次。尽管安装了 Android SDK 的 USB 驱动程序,但似乎还不够。
I've always solved this by installing a program called PdaNet. While I don't know exactly what it is used for and where it gets its drivers - it comes with the drivers that has always fixed the problem for me. You can uninstall the program itself once it has finished.
我总是通过安装一个名为PdaNet的程序来解决这个问题。虽然我不知道它的确切用途以及它的驱动程序的来源 - 它附带的驱动程序总是为我解决问题。完成后,您可以卸载程序本身。
回答by Abir Hasan
Though the answer is accepted, but I'm going to answer it anyway.
虽然答案被接受,但我还是要回答。
From the points perspective, it might seem that it's a lot of work. But it's very simple. And Up un till now it has worked on all the devices I have tried with.
从点数的角度来看,这似乎是很多工作。但这很简单。到目前为止,它已经在我尝试过的所有设备上运行。
At first download the universal ADB driver.Then follow the process below:
首先下载通用 ADB 驱动程序。然后按照以下流程操作:
- Install the Universal ADB driver.
- Then go to the control panel.
- Select Device and Printers.
- Then find your device and right click on it.
- Probably you will see a yellow exclamation mark. Which means the device doesn't have the correct driver installed.
Next, select the properties of the device. Then-
- Select hardware tab, and again select properties.
- Then under general tab select Change Settings.
- Then under the Driver tab, select update driver.
- Then select Browse my computer for driver software.
- Then select Let me pick from a list of device driverson my computer.
- Here you will see the list of devices. Select Android devices. Which will show you all the available drivers.
- Under the modelsection, you can see a lot of drivers available.
- You can select your preferred one.
- Most of the cases the generic ANDROID ADB INTERFACEwill do the trick.
- When you try to install it, it might give you a warningbut go ahead and install the driver.
- And it's done.
- 安装通用 ADB 驱动程序。
- 然后进入控制面板。
- 选择设备和打印机。
- 然后找到您的设备并右键单击它。
- 可能您会看到一个黄色的感叹号。这意味着设备没有安装正确的驱动程序。
接下来,选择设备的属性。然后-
- 选择硬件选项卡,然后再次选择属性。
- 然后在常规选项卡下选择更改设置。
- 然后在驱动程序选项卡下,选择更新驱动程序。
- 然后选择浏览我的计算机以查找驱动程序软件。
- 然后选择让我从计算机上的设备驱动程序列表中选择。
- 在这里您将看到设备列表。选择安卓设备。这将向您显示所有可用的驱动程序。
- 在模型部分下,您可以看到很多可用的驱动程序。
- 您可以选择您喜欢的一种。
- 大多数情况下,通用的ANDROID ADB 接口都可以解决问题。
- 当您尝试安装它时,它可能会给您一个警告,但请继续安装驱动程序。
- 它已经完成了。
Then re-run your app from the android studio. And it will show your device under Choose Device. Cheers!
然后从 android studio 重新运行您的应用程序。它会在Choose Device下显示您的设备。干杯!
回答by Nicolas
I hope it will help, it did the trick for me,
first, after connected my device to the computer I switch the paramater above to "camera device (PTP)";
then, I install PdaNet on my computer, finally all the usb driver were installed, and it works.
My smartphone is a samsung GS2, Android 4.4.2.
我希望它会有所帮助,它对我有用,首先,将我的设备连接到计算机后,我将上面的参数切换为“相机设备(PTP)”;然后,我在我的电脑上安装了 PdaNet,最后安装了所有的 USB 驱动程序,并且它可以工作。
我的智能手机是三星 GS2,Android 4.4.2。
回答by Anson VanDoren
I had the same issue and couldn't get my Nexus 6P to show up as an available device until I changed the connection type from "Charging" to "Photo Transfer(PTP)" and installed the Google USB driver while in PTP mode. Installing the driver prior to that while in Charging mode yielded no results.
我遇到了同样的问题,直到我将连接类型从“充电”更改为“照片传输(PTP)”并在 PTP 模式下安装 Google USB 驱动程序后,我才能让我的 Nexus 6P 显示为可用设备。在充电模式下之前安装驱动程序没有产生任何结果。
回答by Ryan
I know this is old and answered, but after 2 weeks of smashing my head on the table I FINALLY fixed my specific issue...
我知道这是旧的并且得到了回答,但是在将我的头砸在桌子上 2 周后,我终于解决了我的具体问题......
SAMSUNG KNOX was my problem. Version 2.2+ of MyKnox will not allow USB debugging.
SAMSUNG KNOX 是我的问题。MyKnox 2.2+ 版本将不允许 USB 调试。
I uninstalled MyKnox and now it works.
我卸载了 MyKnox,现在它可以工作了。
I hope this saves someone 2 weeks of head smashing.
我希望这可以为某人节省 2 周的时间。
回答by Heitor
That worked for my TP-Link Neffos C5:
这适用于我的 TP-Link Neffos C5:
The first step in configuring a Windows based development system to connect to an Android device using ADB is to install the appropriate USB drivers on the system. In the case of some devices, the Google USB Driver must be installed (a full listing of devices supported by the Google USB driver can be found online at http://developer.android.com/sdk/win-usb.html).
To install this driver, perform the following steps:
- Launch Android Studio and open the Android SDK Manager, either by selected Configure -> SDK Manager from the Welcome screen, or using the Tools -> Android -> SDK Manager menu option when working on an existing project.
- Scroll down to the Extras section and check the status of the Google USB Driver package to make sure that it is listed as Installed.
- If the driver is not installed, select it and click on the Install packages button to initiate the installation.
- Once installation is complete, close the Android SDK Manager.
配置基于 Windows 的开发系统以使用 ADB 连接到 Android 设备的第一步是在系统上安装适当的 USB 驱动程序。对于某些设备,必须安装 Google USB 驱动程序(可以在http://developer.android.com/sdk/win-usb.html在线找到 Google USB 驱动程序支持的设备的完整列表)。
要安装此驱动程序,请执行以下步骤:
- 启动 Android Studio 并打开 Android SDK 管理器,通过从欢迎屏幕中选择配置 -> SDK 管理器,或在处理现有项目时使用工具 -> Android -> SDK 管理器菜单选项。
- 向下滚动到 Extras 部分并检查 Google USB 驱动程序包的状态以确保它被列为已安装。
- 如果未安装驱动程序,请选择它并单击安装包按钮以启动安装。
- 安装完成后,关闭 Android SDK Manager。
Complete instructions on http://www.techotopia.com/index.php/Testing_Android_Studio_Apps_on_a_Physical_Android_Device(check "Windows ADB Configuration" section).
http://www.techotopia.com/index.php/Testing_Android_Studio_Apps_on_a_Physical_Android_Device上的完整说明(检查“Windows ADB 配置”部分)。
I basically updated a lot of stuff and then it worked in both Android Studio and Eclipse!
我基本上更新了很多东西,然后它在 Android Studio 和 Eclipse 中都可以使用!
回答by Mindxxxd
For about 3 weeks, I faced the same problem.
大约 3 周,我遇到了同样的问题。
After googling and trying and asking without solutions, I found that there was an Unknown Devicecalled Android Composite ADB Interfacein the Device Manager
.
google搜索和尝试,并要求没有解决方案之后,我发现有一个未知的设备名为Android的综合亚行界面中Device Manager
。
I had a look on this and finally resolved it by downloading the ADB Driverfrom here. (Maybe you need to troubleshoot your PC but the installer will tell you this.)
我看了一下,最后通过从这里下载ADB 驱动程序解决了这个问题。(也许您需要对 PC 进行故障排除,但安装程序会告诉您这一点。)
回答by Segun Wahaab
In my case, android studio selectively doesnt recognize my device for projects with COMPILE AND TARGET SDKVERSION 29under the app level build.gradle.
就我而言,android studio 有选择地不识别我的设备,用于在应用程序级别 build.gradle 下使用COMPILE AND TARGET SDKVERSION 29的项目。
I fixed this either by downloading 'sources for android 29' which comes up after clicking the 'show package details' under the sdk manager tab or by reducing the compile and targetsdkversions to 28
我通过下载“android 29 的源代码”(在单击 sdk 管理器选项卡下的“显示包详细信息”后出现)或通过将 compile 和 targetsdkversions 减少到 28 来解决此问题
回答by Isaac Martin Otim
This is an old question but here is my solution to the exact problem if you want to use the USB driver you got from the SDK manager, seeing that the documentation @MeowMeow linked is not too current:
这是一个老问题,但如果您想使用从 SDK 管理器获得的 USB 驱动程序,这里是我对确切问题的解决方案,看到链接的文档@MeowMeow 不是最新的:
- Open "Device Manager" on Windows
- Find your device, mine was listed under Android Device > Android ADB Interface (I have an unbranded android device, yours might be different)
- Right click on your device and select "Update Driver Software"
- Select "Browse my computer for driver software"
- Select "Let me pick from a list of device drivers on my computer"
- There will be a "Have Disk" button below your available Drivers, Click on it.
- On the "Install from disk" Dialog, browse to your path_to_sdk/extras/google/usb_driver folder. There should be a file named "android_winusb.inf", select it and click "Open" and select "Ok"
- You should now have a new Android ADB Interface'Model' by Google inc.
- Click "Next" and agree to everything till you are done..
- 在 Windows 上打开“设备管理器”
- 找到您的设备,我的设备列在 Android 设备 > Android ADB 接口下(我有一个无品牌的 android 设备,您的可能会有所不同)
- 右键单击您的设备并选择“更新驱动程序软件”
- 选择“浏览我的计算机以查找驱动程序软件”
- 选择“让我从计算机上的设备驱动程序列表中选择”
- 您的可用驱动程序下方将有一个“从磁盘安装”按钮,单击它。
- 在“从磁盘安装”对话框中,浏览到您的 path_to_sdk/extras/google/usb_driver 文件夹。应该有一个名为“android_winusb.inf”的文件,选择它并单击“打开”并选择“确定”
- 您现在应该有一个新的 Android ADB Interface'Model' by Google inc。
- 单击“下一步”并同意所有内容,直到完成。
Simple...no need for extra software, but you will need to have installed the USB driver from the SDK manager (like the guy who asked the question) before following these steps.
简单...不需要额外的软件,但在执行这些步骤之前,您需要从 SDK 管理器(如提出问题的人)安装 USB 驱动程序。
As a side note, I am running win 8..the steps might differ for you :)
作为旁注,我正在运行 win 8 ..这些步骤对您来说可能会有所不同:)