错误:无法在Android SDK中找到gradle包装器(cordova + ionic)

时间:2017-02-14 05:31:12

标签: android cordova ionic-framework

运行ionic build android

ANDROID_HOME=/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home

Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.
Looked here: /Library/Android/sdk/tools/templates/gradle/wrapper

我尝试使用更新sdk     android update sdk -u

4 个答案:

答案 0 :(得分:6)

将android项目更新为cordova-android 6.2.1

ionic platform update android@6.2.1

有关详细信息,请查看以下链接https://cordova.apache.org/announcements/2017/04/05/android-release.html

答案 1 :(得分:2)

答案 2 :(得分:1)

这适用于我现有的离子项目:

npm install -g cordova
cd <project_dir>
cordova platform update android

答案 3 :(得分:0)

只需安装Gradle with PATH声明为我工作。