Adb 在命令行中显示 'device' 但在 Android Studio 中未经授权

Adb shows 'device' in command line but unauthorized in Android Studio

我正在为我的 Android 应用程序使用 Cubot S208 的 USB 调试。

如果我在命令行中输入 adb devices,我会收到以下信息:

0123456789ABCDEF device

很明显设备已获得授权。

但是,在 Android Studio 中,我收到以下消息:

for device 0123456789ABCDEF: device unauthorized. Please check the confirmation dialog on your device.

为什么会这样?

该设备被 Android studio 识别为 "Cubot S208" 名称,也正确识别可调试应用程序。

所以一切似乎都很好。

当消息出现在我的 phone 屏幕上时,我总是允许从我的笔记本电脑进行 USB 调试。

有什么想法吗?

尝试从您的 phone 中清除调试授权,断开连接并重新连接。如果失败,请尝试杀死 adb,然后尝试启动

for device 0123456789ABCDEF: device unauthorized. Please check the confirmation dialog on your device.

执行这些 adb 命令:

adb kill-server 
adb start-server

之后重新连接您的设备并勾选设备上的调试选项。