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与以前的版本相比有很多变化,所以你必须重置调试目标才能让你的设备正常工作。

切换到PTP USP选项而不是MTP是解决方案。

特别是如果你以前有一个连接,如果你正在使用一些使用ADB连接到你的手机的其他应用程序-关闭该应用程序。我有总指挥官,有插件的ADB连接到手机,这解决了我的问题。

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

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

打开USB调试开关,将设备连接到PC。等待设备被PC检测到。连接时,关闭USB调试,然后再次打开。