Visual Studio Cordova - 您可能没有运行此项目所需的环境或操作系统 [英] Visual Studio Cordova - You may not have the required environment or OS to run this project
问题描述
我在Visual Studio 2015社区 - Apache Cordova有一个问题。我试图在调试模式下运行一个简单的应用程序,在发布模式下,并生成以下错误:
I have a problem in Visual Studio 2015 Community - Apache Cordova. I try to run a simple application both in Debug mode as in Release mode and is generated the following error:
*2> ANDROID_HOME=F:\AndroidSDK
2> JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_55
2>C:\Temp\BlankCordovaApp1\BlankCordovaApp1\platforms\android\cordova\node_modules\q\q.js:126
2>throw e;
2>^
2>Error: Device communication timed out. Try unplugging & replugging the device.
2>at null._onTimeout (C:\Temp\Excluir\BlankCordovaApp1\BlankCordovaApp1\platforms\android\cordova\node_modules\q\q.js:1717:25)
2>at Timer.listOnTimeout (timers.js:110:15)
2> Command finished with error code 1: cmd /s /c "C:\Temp\BlankCordovaApp1\BlankCordovaApp1\platforms\android\cordova\run.bat --nobuild --target=169.254.138.177:5555 --debug --buildConfig=C:\Temp\BlankCordovaApp1\BlankCordovaApp1\build.json"
2> ERROR running one or more of the platforms: Error: cmd: Command failed with exit code 1
2> You may not have the required environment or OS to run this project
2>
2>C:\Temp\BlankCordovaApp1\BlankCordovaApp1\platforms\android\cordova\node_modules\q\q.js:126
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========*
我的AndroidSDK已完成所有API和额外)。路径是正确的我的AndroidSDK。已经尝试在其他版本的Android上运行,错误是一样的。在Visual studio我已经清除cordova缓存和删除的文件夹,并创建了一个新的项目。已重新安装Apache Cordova。仿真器使用Hyper V并正常工作。我的Windows是10 64位。
My AndroidSDK is complete (with all APIs and extras) . The path is correct for my AndroidSDK . Already tried to run on other versions of Android and the error is the same. In Visual studio I have made clear cordova cache and deleted folders and created a new project. Already reinstalled Apache Cordova. The emulators are using Hyper V and operate correctly. My Windows is 10 64 bits.
如何解决这个问题?
推荐答案
超时。
我不知道是什么原因导致此问题,但我有一个可能的解决方案。
I do not know what causes this problem, but I have a possible solution.
platforms \android\cordova\\\
ode_modules\q
Folder: platforms\android\cordova\node_modules\q
档案:q.js
Line: deferred.reject(new Error(message ||Timed out after+ ms +ms));
},ms);
Line: deferred.reject(new Error(message || "Timed out after " + ms + " ms")); }, ms);
修改: deferred.reject(new Error(message ||Timed out after +ms));
},40000);
Modify: deferred.reject(new Error(message || "Timed out after " + ms + " ms")); }, 40000);
但是,在我的情况下,我已经完成手动运行(快捷键:Ctrl + Break),如图:
Visual Studio
However, in my case I have finished running manually (shortcut key: Ctrl + Break), as the figure: Visual Studio
这篇关于Visual Studio Cordova - 您可能没有运行此项目所需的环境或操作系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!