react-native run-android 命令卡在任务应用程序上:installdebug

m2r*_*2rt 5 adb react-native

尝试使用命令 react-native run-android 将应用程序安装到设备。

没有显示错误,但应用程序卡在任务 app:installDebug 上,产生以下输出。

任务:app:installDebug 08:46:24 V/ddms:执行:运行 am get-config 08:46:24 V/ddms:在“xxxxxxxxxxx”上执行“am get-config”:EOF 命中。阅读:-1 08:46:24 V/ddms:执行:返回在“WAS-LX1 - 8.0.0”上安装 APK 'app-debug.apk' for app:debug 08:46:24 D/app-debug。 apk:将 app-debug.apk 上传到设备 'xxxxxxxx' 08:46:24 D/设备:上传文件到设备 'xxxxxxxxxxxx' 08:46:24 D/ddms:读取 /Users/xxxxx/work/xxxx 的文件权限-app/android/app/build/outputs/apk/debug/app-debug.apk 为:rw-r--r-- 08:46:25 V/ddms:执行:运行 pm install -r -t "/ data/local/tmp/app-debug.apk" <============-> 99% 正在执行 [1m 20s] :app:installDebug

大约三个 3 分钟后抛出以下错误:

任务“:app:installDebug”执行失败。com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException

尝试 ./gradlew clean,重新安装 node_modules。Adb device 命令显示设备名称。

Nic*_*oul 5

以下是对我有用的方法,对于相同的错误消息,在奥利奥上:

  1. 拔掉Android设备的USB线
  2. 再次插入(同一 USB 端口)
  3. 再次运行 Gradle
  4. 那次就成功了


m2r*_*2rt 0

尝试了我找到的所有解决方案,但没有任何效果。最后重置系统设置,问题就消失了