Android Studio中的AVD管理器不显示我的设备,但adb设备显示它。我是不是遗漏了什么明显的东西?
当前回答
如果你的Windows甚至不能安装驱动程序,你应该进入设备管理器并获得设备ID(右键单击你的设备->属性->详细信息->硬件ID(在属性中)。 从Android Studio安装谷歌USB驱动程序。 进入android_winusb。inf文件(ANDROID_SDK_DIR/extras/谷歌/usb_driver/),并根据文件格式添加您的设备ID。 再次运行“adb devices”,一切正常。
其他回答
在我的情况下,有多个实例的adb被创建。从系统中拔出设备插头。 打开任务监视器(活动监视器)并检查adb实例。终止所有adb进程。请重新连接设备。它可能会起作用。
我的macbook pro上有usb到usbc的集线器,它以某种方式阻塞了设备,当我直接将它与苹果usbc到usb的适配器连接时,它就工作了。
我的设置
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.
由于似乎没有人提到这个问题,我在Windows 10上遇到了这个问题,并解决了它:
通过确保ANDROID_HOME在系统环境变量中被设置,然后重新启动Android Studio(你可能需要注销并重新登录/重新启动explorer.exe)。 可能不相关,但在Windows 10上确保telnet客户端通过Start -> 'features'
特别是如果你以前有一个连接,如果你正在使用一些使用ADB连接到你的手机的其他应用程序-关闭该应用程序。我有总指挥官,有插件的ADB连接到手机,这解决了我的问题。
推荐文章
- 警告:API ' variable . getjavacompile()'已过时,已被' variable . getjavacompileprovider()'取代
- 安装APK时出现错误
- 碎片中的onCreateOptionsMenu
- TextView粗体通过XML文件?
- 如何使线性布局的孩子之间的空间?
- DSL元素android.dataBinding。enabled'已过时,已被'android.buildFeatures.dataBinding'取代
- ConstraintLayout:以编程方式更改约束
- PANIC: AVD系统路径损坏。检查ANDROID_SDK_ROOT值
- 如何生成字符串类型的buildConfigField
- Recyclerview不调用onCreateViewHolder
- Android API 21工具栏填充
- Android L中不支持操作栏导航模式
- 如何在TextView中添加一个子弹符号?
- PreferenceManager getDefaultSharedPreferences在Android Q中已弃用
- 在Android Studio中创建aar文件