我能够使用cli启动sdk manager。已更新至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
答案 0 :(得分: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
希望它会对你有所帮助。