Cordova CLI Windows-执行Cordova平台添加android时出现ENOENT错误 [英] Cordova CLI Windows - ENOENT error when executing cordova platform add android

查看:125
本文介绍了Cordova CLI Windows-执行Cordova平台添加android时出现ENOENT错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了openssh,并且怀疑从环境变量中删除了我的Path.从那以后,我遇到了以下错误.

I installed openssh, and I suspect that removes my Path from environment variables. Since then, I got this following error.

是什么原因造成的?

What caused this?

cordova info输出以下内容:

cordova info outputs this:

Node version: v6.12.3    

Cordova version: 7.0.0

Config.xml file:

<?xml version='1.0' encoding='utf-8'?>
<widget id="io.cordova.hellocordova" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>HelloCordova</name>
    <description>
        A sample Apache Cordova application that responds to the deviceready event.
    </description>
    <author email="dev@cordova.apache.org" href="http://cordova.io">
        Apache Cordova Team
    </author>
    <content src="index.html" />
    <plugin name="cordova-plugin-whitelist" spec="1" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <platform name="android">
        <allow-intent href="market:*" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
    </platform>
</widget>


No Plugins Currently Installed

No Platforms Currently Installed

我在环境变量中添加了JAVA_HOME和ANDROID_HOME.但仍然是相同的错误

I added JAVA_HOME and ANDROID_HOME in my environment variables. But still same error

推荐答案

是的,这是我的PATH变量中的问题. OpenSSH安装会删除默认值. 我所需要的只是将%SystemRoot%\system32; %SystemRoot%; %SystemRoot%\System32\Wbem;添加到我的PATH

Yes, this is a problem in my PATH variable. OpenSSH installation removes default value. All I need was adding %SystemRoot%\system32; %SystemRoot%; %SystemRoot%\System32\Wbem; to my PATH

这篇关于Cordova CLI Windows-执行Cordova平台添加android时出现ENOENT错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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