Cordova 构建 Android 失败,退出代码为 ENOENT
Cordova Build Android failed with exit code ENOENT
我是 cordova 的初学者,我遵循了创建您的第一个 Cordova 应用程序 文档中提到的所有步骤。
我能够在 windows 机器上满足所有 android 要求。
但我无法 运行 Cordova 构建 android 命令。我收到以下错误
解决方法,我也参考了,但我的问题没有解决
您可以通过命令行更新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
我是 cordova 的初学者,我遵循了创建您的第一个 Cordova 应用程序 文档中提到的所有步骤。
我能够在 windows 机器上满足所有 android 要求。
但我无法 运行 Cordova 构建 android 命令。我收到以下错误
解决方法,我也参考了
您可以通过命令行更新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