问题
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
回答1:
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
来源:https://stackoverflow.com/questions/48397839/cordova-cli-windows-enoent-error-when-executing-cordova-platform-add-android