无法在Android SDK中找到gradle包装器。可能需要更新您的Android SDK [英] Could not find gradle wrapper within Android SDK. Might need to update your Android SDK

查看:368
本文介绍了无法在Android SDK中找到gradle包装器。可能需要更新您的Android SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在ionic2应用程序中构建。我在运行 ionic build android 时遇到此错误。错误日志是

I am trying to take build in an ionic2 application. I got this error while running ionic build android. The error log is

ANDROID_HOME=/home/varun/Android/Sdk
JAVA_HOME=/usr/lib/jvm/java-8-oracle
Error: Could not find gradle wrapper within Android SDK. Might need to    update your Android SDK.
Looked here: /home/varun/Android/Sdk/tools/templates/gradle/wrapper



<我尝试更新sdk,但发现sdk版本是最新的。

I tried updating the sdk but it was found that the sdk version is latest.

当我查看 Android / Sdk / tools 文件夹时,没有模板目录。我在ubuntu 16.04上运行,其中cordova版本 6.5.0

When i looked at the Android/Sdk/tools folder there is no templates directory. I am running on ubuntu 16.04, with cordova version 6.5.0

推荐答案

编辑:

有一个较新版本的Cordova Android也修复了SDK工具的一些问题26.xx

There has been a newer release of Cordova Android that also fixes some problems with SDK tools 26.x.x

cordova平台更新android@6.2.2

cordova platform rm android
cordova platform add android@6.2.2

旧答案

谷歌破解了Cordova Android 6.1.x及其他一些框架及其最新的sdk工具更新。

Google broke Cordova Android 6.1.x and some other frameworks with their latest sdk tools update.

Cordova Android 6.2.1已发布,现在与最新的Android SDK兼容。

Cordova Android 6.2.1 has been released and it's now compatible with latest Android SDK.

您可以使用更新当前不兼容的Android平台 cordova平台更新android@6.2.1

You can update your current incompatible android platform with cordova platform update android@6.2.1

或者您可以删除现有平台并添加新平台(将删除您在Project / platforms / android /文件夹中所做的任何手动更改

Or you can remove the existing platform and add the new one (will delete any manual change you did inside yourProject/platforms/android/ folder)

cordova平台rm android
cordova平台添加android@6.2.1

您必须指定版本,因为当前CLI默认安装6.1.x.

You have to specify the version because current CLI installs 6.1.x by default.

这篇关于无法在Android SDK中找到gradle包装器。可能需要更新您的Android SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆