在Android调试adb下运行adb shell命令时,报出device not found的错误的解决办法:
将Android Studio目录下sdk\platform-tools\目录下的adb.exe、AdbWinApi.dll、AdbWinUsbApi.dll文件拷贝到C盘的C:\Windows\System32目录下,若依旧报错,可尝试重新启动机器。
这之后,继续运行adb shell命令却报出device offline的错误。这一错误的原因在于自己的adb版本过低,可用更高版的adb.exe、AdbWinApi.dll、AdbWinUsbApi.dll这三个文件进行更新解决问题。
解决后效果如图: