【问题标题】:Cordova CLI Windows - ENOENT error when executing cordova platform add androidCordova CLI Windows - 执行 cordova platform add android 时出现 ENOENT 错误
【发布时间】:2018-01-23 09:07:36
【问题描述】:

我安装了 openssh,我怀疑这会从环境变量中删除我的路径。从那以后,我收到了以下错误。

这是什么原因造成的?

cordova info 输出如下:

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。但还是一样的错误

【问题讨论】:

    标签: android cordova ionic-framework phonegap


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-07-11
      • 1970-01-01
      • 2017-10-14
      • 2017-10-24
      • 2016-09-02
      • 1970-01-01
      • 2015-11-21
      相关资源
      最近更新 更多