android - Cordova Build Android 失败,退出代码为 ENOENT

标签 android windows cordova npm phonegap-build

我是 cordova 的初学者,我遵循了创建您的第一个 Cordova 应用程序文档中提到的所有步骤。

我能够满足windows机器上的所有android要求。

cordova android requirements

但我无法运行Cordova build android 命令。我收到以下错误

cordova build

解决方案,我也引用了this link但是我的问题没有解决

最佳答案

您可以通过命令行更新android sdk:

转到文件夹 android-sdk\tools\bin 并运行命令:

列出已安装和可用的包

sdkmanager --list

安装包

sdkmanager packages [options]

比如获取adb和fastboot,安装最新的平台工具:

sdkmanager "platforms;android-25"

用法:

  sdkmanager --update [<common args>]
  sdkmanager --list [<common args>]
  sdkmanager [--uninstall] [<common args>] \
    [--package_file <package-file>] [<packages>...]

In its first form, installs, or uninstalls, or updates packages.
    <package> is a sdk-style path (e.g. "build-tools;23.0.0" or
             "platforms;android-23").
    <package-file> is a text file where each line is a sdk-style path
                   of a package to install or uninstall.
    Multiple --package_file arguments may be specified in combination
     with explicit paths.
In its second form (with --update), currently installed packages are
    updated to the latest version.
In its third form, all installed and available packages are printed out.

引用:https://developer.android.com/studio/command-line/sdkmanager.html

关于android - Cordova Build Android 失败,退出代码为 ENOENT,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43452779/

相关文章:

html - 使绝对div的内容可滚动

android - 将 Android volley 导入 Android Studio

windows - 适用于 64 位 Windows 7 的廉价 Windows 驱动程序签名

windows - 我们如何在批处理文件中使用当前目录路径(%~dp0)和 'ren' 命令?

ios - Cordova:启动特定的 iOS 模拟器图像

android - Ionic 未在 Windows 7 上安装 - 出现许多错误

android expandablelistview,仅在单击组指示器时展开 View ,如果单击组指示器以外的任何位置,则打开新 Activity

android - Textview 未根据 pageradapter 内的位置进行更新

android - 如何在触摸时获取 recyclerView 的项目的位置

运行 mercurial 命令时 Windows 批处理文件退出