简体   繁体   中英

Cordova CLI Windows - ENOENT error when executing cordova platform add android

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 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

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

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; %SystemRoot%\\system32; %SystemRoot%; %SystemRoot%\\System32\\Wbem; to my PATH

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM