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


当前回答

我的设置

Android Studio 3.5.3 macOS 10.14.6 Android 9设备通过Belkin USB集线器连接到Mac。

当从谷歌的Android github repo运行Kotlin示例项目时,没有配置,也没有设备显示在UI中。

解决方案

File > Sync Project with Gradle Files But my internet connection needs a fix, so I had to go to Preferences > System Settings > HTTP Proxy to specify a working proxy. Make sure buildscript{ ext.kotlin_version } runs a more recent version. I had to upgrade it from 1.2.xx to 1.3.xx. Now the project appears to be ready to build (the default emulator Nexus config is now enabled). Rebuild the project for the emulator just to make sure. Then I had to unplug my device from the USB hub and connect it to Mac directly. Now Android Studio sees my device. Plug the device again into the USB hub. Now Android Studio sees my device with the hub, too.

其他回答

令人惊讶的是,在Debian Linux上对我有效的只有:

adb kill-server

不用再开始了!!

我一关闭服务器,设备就出现在Android Studio中。我发现这一点的唯一原因是我的终端模拟器窗口是透明的。: D

我发现适合我的方法是:

CD到你的sdk platform-tools文件夹 检查adb是否看到您的设备 亚行。/设备 如果它显示“设备连接列表”和下面的空行,然后重新启动adb,如下所示: 亚行kill-server。/ 亚洲开发银行。/启动服务器 然后重新运行./adb devices,看看它是否拾取了该设备,如下所示: 所附设备清单 015年d2bc285601c0a设备

有些电缆不能用于开发人员模式或传输文件。一个解决办法是更换你的有线电视,不要浪费时间。

Trendblog邮件

编辑

一些USB3端口也会引起问题。不确定是否有办法检查电缆/usb是否工作。但是有一种方法可以检测出USB类型是USB2还是USB3?. 如果您正在使用USB3,也可能是端口问题。

请参阅http://visualgdb.com/KB/usbdebug-manual/,因为这对我来说很有效。必须在Android工作室内下载并安装USB驱动程序,然后在windows 8.1中通过设备管理器实际安装驱动程序

I recently had trouble with this, and regardless of what I did(restart adb, edit adb_usb.ini, restart computer+device+swap usb port, reinstall studio etc. etc.) I just couldnt get it to work, and could not even detect my device using 'adb devices'. Finally after about 2 hours of googling and testing, someone suggested switching to PTP instead of MTP on my device. When I did this I got a popup on my device asking me to allow my mac access and suddenly everything worked(had to restart studio for it to show up there as well though).

我现在可能会碰到这个线程,但它是谷歌搜索的第一个结果,我有很多麻烦找到这个问题的答案,所以我认为这应该作为一个解决方案添加。