gpt4 book ai didi

android - MSBUILD : cordova-build error : Error: cmd: Command failed with exit code ENOENT

转载 作者:行者123 更新时间:2023-11-30 00:20:31 25 4
gpt4 key购买 nike

我的 Cordova 程序在浏览器中执行,没有构建错误。当我尝试通过调试构建到设备 (F5) 将它发送到我的 Android 手机时,我在输出窗口中收到此构建错误:

MSBUILD : cordova-build error : Error: cmd: Command failed with exit code ENOENT

输出窗口中失败的消息是:

You have been opted out of telemetry. To change this, run: cordova telemetry on.
No scripts found for hook "before_compile".
ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_131
Reading build config file: C:\Users\S50A\Documents\Visual Studio 2017\Projects\ClockJsAN\ClockJsAN\build.json
Running command: cmd "/s /c ""C:\Users\S50A\Documents\Visual Studio 2017\Projects\ClockJsAN\ClockJsAN\platforms\android\gradlew.bat" cdvBuildDebug -b "C:\Users\S50A\Documents\Visual Studio 2017\Projects\ClockJsAN\ClockJsAN\platforms\android\build.gradle" -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true""
Command finished with error code ENOENT: cmd /s /c ""C:\Users\S50A\Documents\Visual Studio 2017\Projects\ClockJsAN\ClockJsAN\platforms\android\gradlew.bat" cdvBuildDebug -b "C:\Users\S50A\Documents\Visual Studio 2017\Projects\ClockJsAN\ClockJsAN\platforms\android\build.gradle" -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"
1>MSBUILD : cordova-build error : Error: cmd: Command failed with exit code ENOENT
1>Done building project "ClockJsAN.jsproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

很明显上面的哪个命令失败了,但我不清楚如何修复它。 ENOENT 似乎意味着什么东西没有找到。

(即 cmd/s/c ... 产生了错误)。

我注意到我没有在 config.xml 中安装任何插件。这可能是它要找的东西吗?我还注意到,当我尝试通过 config.xml 安装 Cordova Media Plugin 时,我遇到了同样的错误。请指教...

最佳答案

如果在创建新的空白 Cordova 应用程序时也发生这种情况,则说明您系统中的某些内容未正确设置。您应该始终添加到任何应用程序的唯一插件是设备插件。

按照本指南确保您已安装所有必需的工具: Configure the Visual Studio Tools for Apache Cordova

确保您使用的是 x86 版本的 Java、Node、Git 和其他工具。我正在使用 Node 4.8.4 ,最新的来自 4 分支。您还需要使用 SDK Manager GUI 安装 Android SDK .此工具不需要 Android Studio。

如果所有其他方法均失败,请修复您的 Visual Studio 安装和/或重新安装 Apache Cordova tools .

关于android - MSBUILD : cordova-build error : Error: cmd: Command failed with exit code ENOENT,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46388156/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com