运行cordova build android
(Windows 7)时出现以下错误:
BUILD FAILED
option to get more log output.
Total time: 7.631 secs
ERROR building one of the platforms: Error code 1 for command: cmd with args: /s,/c,"C:\foo\platforms\android\gradlew cdvBuildDebug -b C:\foo\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"
You may not have the required environment or OS to build this project
问题显然是它试图运行platforms\android\gradlew
而不是platforms\android\gradlew.bat
,因为这是Windows而不是unix / macos。当我运行节点process.platform
时返回“win32”。可能是什么问题?