hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] 系统找不到指定的文件 类似问题解决办法
通过代码寻找,问题代码出现在这句
device_name = subprocess.check_output(
[_ADB, "-s", device_id, "shell", "getprop", "ro.product.model"]
)
其中_ADB变量值为adb;这句话的意思是在cmd中执行adb -s shell {device_id} getprop ro.product.model
并返回执行结果,这里返回的结果为系统找不到指定的文件
,即adb该命令未加入环境变量,那我们只需将adb加入环境变量即可。(注意:pycharm需要重启才能刷新环境变量)