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.
其他回答
如果你的手机之前还能用
在你做任何复杂的事情之前,这可能是一个简单的问题。拔下插头再插上。
如果有其他问题
您还可能希望检查您的配置是否设置为启动到您的手机。
执行命令——> edit configuration
如果你要在模拟器上的设备之间切换,请确保你要么默认使用USB设备,要么使用选择器对话框。
我不得不杀死所有adb,因为不知何故,Android Studio设法崩溃,不想再与adb通信。因此,我的设备没有显示出来。
因此,退出Android Studio,终止终端中的所有adb实例并再次启动Android Studio(应该询问它是否应该启用调试)起作用了。
打开调试模式后,打开设置/开发人员选项 更新配置相同的映像
同时取消勾选“工具”-“Android”-“启用ADB集成”。
这是我把Windows升级到10后的工作。
在更新到Android Studio 3.1后,它无法看到我的设备,但adb可以看到它们。
要解决这个问题,你需要开始调试模拟器一次,然后在运行->编辑配置中切换回USB设备…- >目标。这一次它应该会起作用。
Android Studio 3.1与以前的版本相比有很多变化,所以你必须重置调试目标才能让你的设备正常工作。
推荐文章
- 警告: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文件