gpt4 book ai didi

cordova - Ionic 3 Cordova 错误 : Device communication timed out. 尝试拔下并重新插入设备

转载 作者:行者123 更新时间:2023-12-02 15:25:47 25 4
gpt4 key购买 nike

我最近遇到了这个错误。我不知道为什么会这样。过去一切都工作正常,但现在没有明显原因,该应用程序将不再部署在设备上。我已经尝试过这篇文章中的解决方案,但仍然没有成功。

Ionic run error exit code 1 device communication timed out

每次运行 ionic cordova run android 命令时都会出现错误。

BUILD SUCCESSFUL in 3s
47 actionable tasks: 1 executed, 46 up-to-date

Built the following apk(s):

C:\wamp64\www\afghanjam\platforms\android\app\build\outputs\apk\debug\app-
debug.apk

ANDROID_HOME=C:\Users\Hamid\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\java\jdk1.8.0_102
No target specified, deploying to device 'LGH81539ab6482'.

**(node:8400) UnhandledPromiseRejectionWarning: Unhandled promise rejection
(rejection id: 1): CordovaError: Device communication timed out. Try
unplugging & replugging the device.**

(node:8400) [DEP0018] DeprecationWarning: Unhandled promise rejections are
deprecated. In the future, promise rejections that are not handled will
terminate the Node.js process with a non-zero exit code.

[OK] Your app has been deployed.
Did you know you can live-reload changes from your app with --livereload?

我尝试删除 android 并将其从平台列表中添加回来。还尝试从计算机上卸载手机并从设备管理器重新安装以更新驱动程序,但仍然没有成功。

最佳答案

我找到了一个棘手的解决方法:

  1. 转到:\platforms\android\cordova\node_modules\q

  2. 定位:

    var timeoutId = setTimeout(function () {deferred.reject(new
    Error(message || “Timed out after " + ms + " ms”)); }, ms);
  3. 更改为:

    var timeoutId = setTimeout(function () {
    deferred.reject(new Error(message || “Timed out after " + ms + "
    ms”)); }, 600000); //10 minutes before timing out

关于cordova - Ionic 3 Cordova 错误 : Device communication timed out. 尝试拔下并重新插入设备,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50719087/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com