Android Studio中的AVD管理器不显示我的设备,但adb设备显示它。我是不是遗漏了什么明显的东西?
当前回答
打开USB调试开关,将设备连接到PC。等待设备被PC检测到。连接时,关闭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.
我不得不杀死所有adb,因为不知何故,Android Studio设法崩溃,不想再与adb通信。因此,我的设备没有显示出来。
因此,退出Android Studio,终止终端中的所有adb实例并再次启动Android Studio(应该询问它是否应该启用调试)起作用了。
执行以下步骤来解决上述问题。
右键单击项目 选择“创建运行配置” 所有的测试。(第二个选项) 在“General”页签中——>目标设备
请参阅http://visualgdb.com/KB/usbdebug-manual/,因为这对我来说很有效。必须在Android工作室内下载并安装USB驱动程序,然后在windows 8.1中通过设备管理器实际安装驱动程序
我相信这对外面的人很有用。 在我的情况下,我在mac上运行Android Studio,也尝试Visual Studio Xamarin。同时打开这两扇门会造成这种冲突。所以关闭Visual就足够了。
推荐文章
- 警告: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文件