离子运行错误退出代码1设备通信超时 [英] Ionic run error exit code 1 device communication timed out

查看:144
本文介绍了离子运行错误退出代码1设备通信超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在尝试运行任何Cordova项目时遇到此错误,无论是Ionic还是纯粹的Cordova项目。

I recently started getting this error when trying to run any Cordova project, whether it is Ionic or just a plain Cordova project.

它允许我构建项目没有任何问题,但如果我尝试使用命令 ionic run android cordova运行android 推送到设备或模拟器我收到以下错误:

It allows me to build the project without any issues but if I try to use the commands ionic run android or cordova run android to push to a device or emulator I get the error below:

我一直在努力,可以确认它是昨天工作。

平均时间没有变化。这是在Windows机器上。我已经格式化并重新安装了一天有用的东西然后我开始收到相同的错误。

I have worked on and can confirm that it was working yesterday.
Nothing changed in the mean time. This is on a Windows machine. I have formatted and reinstalled everything which helped for a day then I started receiving the same errors.

NPM version 2.14.12
Ionic version 1.7.12
Cordova version 5.4.1
Java version 1.8.0_66


推荐答案

解决此问题的黑客(但不是真正的解决方案)是修改文件 platforms\android\cordova \ node_modules \ q \\ q.js 在线 1716-1718

A hack to solve this (but not a real solution) is to modify file platforms\android\cordova\node_modules\q\q.js on line 1716-1718

来自:

var timeoutId = setTimeout(function () {
  deferred.reject(new Error(message || "Timed out after " + ms + " ms"));
}, ms);

对此:

var timeoutId = setTimeout(function () {
  deferred.reject(new Error(message || "Timed out after " + ms + " ms"));
}, 15000);

这个hack来自另一个stackoverflow问题:视觉工作室Cordova - 您可能没有所需的环境或运行此项目的操作系统
由于此处有更好的问题解释,我没有将此标记为重复。

这篇关于离子运行错误退出代码1设备通信超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆