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.

其他回答

在更新到Android Studio 3.1后,它无法看到我的设备,但adb可以看到它们。

要解决这个问题,你需要开始调试模拟器一次,然后在运行->编辑配置中切换回USB设备…- >目标。这一次它应该会起作用。

Android Studio 3.1与以前的版本相比有很多变化,所以你必须重置调试目标才能让你的设备正常工作。

在我的情况下,有多个实例的adb被创建。从系统中拔出设备插头。 打开任务监视器(活动监视器)并检查adb实例。终止所有adb进程。请重新连接设备。它可能会起作用。

如果您的设备在此问题之前正在使用Android Studio,那么重新启动设备可以解决问题。

重新启动后,请确保再次从开发人员选项中打开USB调试。

在我的情况下,我必须设置我的android启用USB调试。

https://developer.android.com/studio/run/device#setting-up

我的macbook pro上有usb到usbc的集线器,它以某种方式阻塞了设备,当我直接将它与苹果usbc到usb的适配器连接时,它就工作了。