"error: device not found" and "error:device offline"

编译app里面的源码时,有时候由于模拟器闲置太久,把apk文件添加到模拟器中会报错:error:device not found

通常这个时候,我只需要:

adb kill-server

adb remount

然后就可以把我的apk安装到模拟器里。

今天,在试这种办法突然不行了,老是出现"error:device offline",google了下,发现只需要添加一行命令就可以了,具体如下:

adb kill-server

adb start-server

adb remount

然后把我的apk安装到模拟器成功。

原文地址:https://www.cnblogs.com/slider/p/2243689.html