Android Studio中的AVD管理器不显示我的设备,但adb设备显示它。我是不是遗漏了什么明显的东西?


当前回答

这是我今天第一次通过Android Studio运行Android项目。x版本,我也有同样的问题。然而,这是与Flutter插件。我有一个变通的人与类似的设置。

我的设置:

macOS Mojave在MacBook上,带有Type-C-to-USB加密狗 Android 6.0 Android Studio 3.4.1: Android SDK 9。+ 6.0 在Mac上,定义了ANDROID_HOME, PATH包含所有所需的工具路径

观察

Adb devices给出正确的设备信息; 颤振设备显示正确的设备信息与更多详细信息; Android Studio的连接助手显示Android为检测到的USB设备; 工具栏显示<没有设备>; AVD管理器显示没有这样的设备。

我的解决方案

打开终端,cd到我的项目根目录; 运行扑动运行和应用程序是正确部署和运行良好;

在那之后,我的观察

工具栏显示我的设备名称;然后我可以直接从工具栏运行一切,包括热重载; 我的设备上的USB配置自动从默认的MTP切换到PTP; AVD管理器仍然没有显示我的设备。耻辱!

但至少我不再被封锁了。

参考:

https://github.com/flutter/flutter-intellij/issues/1525

其他回答

尝试以下解决方案(适用于Windows):

进入sdk工具安装路径,在\sdk\platform-tools文件夹下运行以下命令: 亚洲开发银行设备

如果你的设备列出了它应该显示如下内容:

C:\android\sdk\platform-tools>adb devices
List of devices attached
081e96500591f039        device

如果没有,请遵循以下方法:

Try these commands: adb kill-server adb start-server Make sure your phone has Developer Options in Settings (if not, go to Settings, About phone (or device), click on Android Version multiple times until you see a message). Make sure USB debugging on your phone is enabled (go to Developer Options in Settings and turn it on) Make sure you have Select USB Configuration set to MTP (this is also in Developer Options). Make sure you can see your files in your device in Windows Explorer when you connect via USB. Make sure you have the driver for your device properly installed (most of the time, this happens when you first plug in your USB cable). In Windows, right click on Computer, and go to Device Manager, check if you have Android Device right on the root folder and under it should be Android Composite ADB Interface. If you don't have this, you have to download the Google USB Driver. Get it here:

http://developer.android.com/sdk/win-usb.html

在设备管理器中,找到您的设备(应该有黄色感叹号),右键单击,并更新驱动程序(打开带有您刚刚下载的驱动程序的文件夹) 如果这不起作用,尝试重新启动Android Studio或重新插入设备。

一些便宜的设备(一些30美元的平板电脑)不提供USB驱动程序来连接设备管理器,所以在这种情况下你就不走运了。

以上答案都没有解决我的问题,直到我更新SDK平台工具。这可能是这个问题的原因之一。

在我的情况下,解决方案是关闭重新启动Android Studio

如果你的Windows甚至不能安装驱动程序,你应该进入设备管理器并获得设备ID(右键单击你的设备->属性->详细信息->硬件ID(在属性中)。 从Android Studio安装谷歌USB驱动程序。 进入android_winusb。inf文件(ANDROID_SDK_DIR/extras/谷歌/usb_driver/),并根据文件格式添加您的设备ID。 再次运行“adb devices”,一切正常。

对于三星Galaxy s4,我通过安装Kies软件解决了这个问题,之后一切都很顺利。