2

我可以使用 cli 启动 sdk 管理器。更新至 Android sdk 工具 24.4.1。ANDROID_HOME 已设置为 C:\Program Files\Android\android-sdk\platform-tools。ant 已安装并添加到路径中。该应用程序已创建,但无法构建。并抛出如下所示的错误。感谢你的帮助。

E:\PhoneGapApps\test2>phonegap build android
[phonegap] executing 'cordova platform add --save android'...
[phonegap] completed 'cordova platform add --save android'
[phonegap] executing 'cordova build android'...
cp: no such file or directory: E:\PhoneGapApps\test2\icon.png
ANDROID_HOME=C:\Program Files\Android\android-sdk\platform-tools
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_60
ERROR building one of the platforms: Could not find gradle wrapper within Androi
d SDK. Might need to update your Android SDK.
Looked here: C:\Program Files\Android\android-sdk\platform-tools\tools\templates
\gradle\wrapper
You may not have the required environment or OS to build this project

Error: Could not find gradle wrapper within Android SDK. Might need to update yo
ur Android SDK.
Looked here: C:\Program Files\Android\android-sdk\platform-tools\tools\templates
\gradle\wrapper
4

1 回答 1

2

在系统变量中设置ANDROID_HOME如下

C:\Program Files\Android\android-sdk

并在用户变量中设置路径如下

appropriate jdkpath ; C:\Program Files\Android\android-sdk\tools;C:\Program Files\Android\android-sdk\platform-tools

希望它会帮助你。

于 2016-03-10T07:10:24.590 回答