Could not find gradle wrapper within Android SDK. Might need to update your Android SDK

android, android-sdk-tools, cordova, ionic2

Solution

Edit:

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

`cordova platform update android@6.2.2`

or

cordova platform rm android
cordova platform add android@6.2.2

Old answer

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

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

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

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 platform rm android cordova platform add android@6.2.1`

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

Problem

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 ``` I tried updating the sdk but it was found that the sdk version is latest. 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`

Original source

Related problems