cordova运行android给出错误“系统找不到指定的路径。”
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了cordova运行android给出错误“系统找不到指定的路径。”相关的知识,希望对你有一定的参考价值。
在新的cordova安装中,我收到以下错误:
$ cordova run android
Android Studio project detected
ANDROID_HOME=C:UsersmyuserAppDataLocalAndroidSdk
JAVA_HOME=C:Program FilesJavajdk1.8.0_171
studio
The system cannot find the path specified.
(node:17492) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1
at ChildProcess.whenDone (C:UsersmyuserCode estplatformsandroidcordova
ode_modulescordova-commonsrcsuperspawn.js:169:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:17492) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:17492) [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.
其他人遇到过这个问题?我已经尝试将环境变量添加到我的Windows 10系统但没有成功。
版本:
高于6.1.0
节点8.11.2
cordova 8.0.0
Windows 10
以上是关于cordova运行android给出错误“系统找不到指定的路径。”的主要内容,如果未能解决你的问题,请参考以下文章
运行cordova build android时出错(退出代码1)
Netbeans Cordova PushPlugin 无法在 iOS 上运行
来自 Cordova 的流星运行 android-spawn ENOENT 和 gradle 错误