Android Studio:模拟器和物理设备:"Device is waiting for you to grant permission for USB debugging"

Android Studio: emulator & physical device: "Device is waiting for you to grant permission for USB debugging"

Android studio 没有启动我的设备和应用程序,而是单独启动设备。使用 gradle 构建应用程序后,它会旋转并显示“等待设备上线”。

我尝试过的事情:

任何建议都很好,这里是错误描述的屏幕截图以供参考:

按照这些思路阅读许多问题后,我找到了 运行 adb devices 的建议。这样做显示 emulator-5554 unauthorized,谷歌搜索显示堆栈溢出问题的解决方案:

解决方案:创建任何硬件类型的新设备,但不要使用推荐的系统映像。而是转到 x86 Images 选项卡和 select 一个带有 (Google Apis) 而不是 (Google Play) 的选项卡。

此后无需重新启动、冷启动或擦除,只需构建应用即可启动!