Error: Could not find gradle wrapper within android sdk. Might need to update yo ur Android SDK

Cannot build out my application.
Even i have reinstalled my android sdk.
Can anyone build it for me? give me the link to tutorial how to build it on phonegap build cloud service.

3 Likes

Hey!

Try to update your SDK as follows:

I’m with the latest ionic and cordova also, and i’m not having this issue.

Good luck!

I was having a similar issue. The ANDROID_HOME environment variable was in correct, It had gotten the tools directory appended to it some how. Probably from my own tinkering, but might be something to watch out for.

1 Like

For future reference to other readers. Yeah. Make sure ANDROID_HOME includes the version number of the Android API you’re targeting, e.g.:

… in ~/.bash_profile:

export ANDROID_HOME=/usr/local/Cellar/android-sdk/24.1.2
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
3 Likes

If you had the ANDROID_HOME environmental variable in (for example) /Users/george/android-sdk-macosx, then you installed the Android Studio and after that at some point you have uninstalled it, then you should delete /Users/george/Library/Android folder.

I have same error: could not find gradle wrapper within android sdk when i build ionic, but i was solve. I just download Android SDK tools package and copy extract file to C:\Users\CURRENT_USER\AppData\Local\Android\sdk and build ionic/cordova again.

its work for me.

35 Likes

Thanks… It worked for me.

1 Like

Copied just the template directory from the .zip you posted here into sdk/tools/ and it works best! Thanks.

1 Like

thank you @trisna1192
it worked for me too on Windows 8.1

As easy as that.

I had the problem on Mac, so I did download the SDK tools, copy-paste it in /Users/username/Library/Android/sdk, and it worked instantly.

But I absolutly don’t know what causes the issue.

50 Likes

thanks for the link, DaCookie, had the same issue last two days but your link fixed it perfectly.

1 Like

Thanks @DaCookie :slight_smile:

Thanks @DaCookie, your suggestion worked for me as well.
I ran into this issue after I updated some packages.

@DaCookie Thanks for resolving but I still don’t get this happenings.
Recently I got 2 macs and I set it up twice in a row in this week,
and at the first time, this was worked fine with just install the Android Studio,
and I needed this kind of solution for the next time.

I don’t get this how SDK management system just got changed on the same machine and mechanism at the almost same moment -_-

just bad timming?

yeah i think @DaCookie solving is the best…
i was install android studio etc…but still doesnt work.
and then
Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.
Looked here: /Users/melodycguitarista/Library/Android/sdk/tools/templates/gradle/wrapper

some link give solution to download tools_r25.2.5-macosx.zip
i copy and replaced all in folder
/Users/melodycguitarista/Library/Android/sdk/tools/templates/gradle/wrapper
and try running again ionic build android
for some while BUILD SUCCESSFUL

Total time: 8 mins 9.394 secs

Built the following apk(s):
/Users/melodycguitarista/DEsktop/icymobile/platforms/android/build/outputs/apk/android-debug.apk

4 Likes

Thanks! Worked for me!!

thanks DaCookie, its worked fo me.

Got it working thanks to @DaCookie advice…
Weird behaviour though

Works for me, awsome

thx u !!! share this link for others user http://mirrors.neusoft.edu.cn/android/repository/

1 Like