# Ionic build android failed

**URL:** <https://forum.ionicframework.com/t/ionic-build-android-failed/88742>\
**Category:** ionic-v3\
**Created:** [May 3, 2017, 12:01pm UTC](https://forum.ionicframework.com/t/ionic-build-android-failed/88742 "2017-05-03T12:01:10Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![owaisbakhtiar](https://avatars.discourse-cdn.com/v4/letter/o/48db29/32.png) [@owaisbakhtiar](https://forum.ionicframework.com/u/owaisbakhtiar)\
**Post date:** [May 3, 2017, 12:01pm UTC](https://forum.ionicframework.com/t/ionic-build-android-failed/88742/1 "2017-05-03T12:01:10Z")

</div>

Hello Guys,

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

Whenever i run ionic build android the above error is generated. Anyone who has faced and solved the issue please let me know 🙂  
Thanks

---

<div class="post-metadata">

**Author:** ![kgaspar](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/kgaspar/32/108738_2.png) [@kgaspar](https://forum.ionicframework.com/u/kgaspar)\
**Post date:** [May 3, 2017, 12:14pm UTC](https://forum.ionicframework.com/t/ionic-build-android-failed/88742/2 "2017-05-03T12:14:48Z")

</div>

Have you installed the android SDK via android studio or the android SDK standalone installer?

---

<div class="post-metadata">

**Author:** ![owaisbakhtiar](https://avatars.discourse-cdn.com/v4/letter/o/48db29/32.png) [@owaisbakhtiar](https://forum.ionicframework.com/u/owaisbakhtiar)\
**Post date:** [May 3, 2017, 12:25pm UTC](https://forum.ionicframework.com/t/ionic-build-android-failed/88742/3 "2017-05-03T12:25:24Z")

</div>

Yes I have installed android SDK @kgaspar … also the paths are defines as you can see in the error message

**Error: Could not find gradle wrapper within Android SDK .** showing the error of gradle wrapper in android sdk… and when I go to the path given in error

**Looked here: /Users/owais/Library/Android/sdk/tools/templates/gradle/wrapper**  
I actually could not find any template folder here

---

<div class="post-metadata">

**Author:** ![owaisbakhtiar](https://avatars.discourse-cdn.com/v4/letter/o/48db29/32.png) [@owaisbakhtiar](https://forum.ionicframework.com/u/owaisbakhtiar)\
**Post date:** [May 3, 2017, 12:45pm UTC](https://forum.ionicframework.com/t/ionic-build-android-failed/88742/4 "2017-05-03T12:45:01Z")

</div>

Yes I have installed android SDK @kgaspar … also the paths are defines as you can see in the error message

Error: Could not find gradle wrapper within Android SDK . showing the error of gradle wrapper in android sdk… and when I go to the path given in error

Looked here: /Users/owais/Library/Android/sdk/tools/templates/gradle/wrapper  
I actually could not find any template folder here

---

<div class="post-metadata">

**Author:** ![kgaspar](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/kgaspar/32/108738_2.png) [@kgaspar](https://forum.ionicframework.com/u/kgaspar)\
**Post date:** [May 3, 2017, 12:47pm UTC](https://forum.ionicframework.com/t/ionic-build-android-failed/88742/5 "2017-05-03T12:47:19Z")

</div>

Have you checked this [thread](https://forum.ionicframework.com/t/error-could-not-find-gradle-wrapper-within-android-sdk-might-need-to-update-yo-ur-android-sdk/22056) here. It is the same problem as yours. 🙂

---

<div class="post-metadata">

**Author:** ![owaisbakhtiar](https://avatars.discourse-cdn.com/v4/letter/o/48db29/32.png) [@owaisbakhtiar](https://forum.ionicframework.com/u/owaisbakhtiar)\
**Post date:** [May 3, 2017, 12:49pm UTC](https://forum.ionicframework.com/t/ionic-build-android-failed/88742/6 "2017-05-03T12:49:53Z")

</div>

Ok I am trying this… Hope for the best 🙂

---

<div class="post-metadata">

**Author:** ![redamed92](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/redamed92/32/107830_2.png) [@redamed92](https://forum.ionicframework.com/u/redamed92)\
**Post date:** [May 3, 2017, 12:51pm UTC](https://forum.ionicframework.com/t/ionic-build-android-failed/88742/7 "2017-05-03T12:51:21Z")

</div>

i had the same problem.i followed another answer on a post here and it worked  
here s what i did:i downloaded sdk tools package [https://dl.google.com/android/repository/tools\_r25.2.3-windows.zip](https://dl.google.com/android/repository/tools_r25.2.3-windows.zip) then you extract it to C:\Users\CURRENT\_USER\AppData\Local\Android\sdk.  
you 'll need to replace the current user.then build again.this worked for me  
here’s the link to that post if you want to  
[https://forum.ionicframework.com/t/error-could-not-find-gradle-wrapper-within-android-sdk-might-need-to-update-yo-ur-android-sdk/22056](https://forum.ionicframework.com/t/error-could-not-find-gradle-wrapper-within-android-sdk-might-need-to-update-yo-ur-android-sdk/22056)  
and check trisna1192 answer

---

<div class="post-metadata">

**Author:** ![owaisbakhtiar](https://avatars.discourse-cdn.com/v4/letter/o/48db29/32.png) [@owaisbakhtiar](https://forum.ionicframework.com/u/owaisbakhtiar)\
**Post date:** [May 3, 2017, 12:52pm UTC](https://forum.ionicframework.com/t/ionic-build-android-failed/88742/8 "2017-05-03T12:52:39Z")

</div>

Yes I am going to try the same one 🙂 thanks @redamed92

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [May 3, 2017, 7:22pm UTC](https://forum.ionicframework.com/t/ionic-build-android-failed/88742/9 "2017-05-03T19:22:10Z")

</div>

You won’t need these hacky solutions any more, see my post over there:

> [@Error: Could not find gradle wrapper within android sdk. Might need to update yo ur Android SDK](https://forum.ionicframework.com/t/error-could-not-find-gradle-wrapper-within-android-sdk-might-need-to-update-yo-ur-android-sdk/22056/47):
>
> This will probably solve all these problem: [https://cordova.apache.org/announcements/2017/04/28/android-release.html](https://cordova.apache.org/announcements/2017/04/28/android-release.html)

---

<div class="post-metadata">

**Author:** ![owaisbakhtiar](https://avatars.discourse-cdn.com/v4/letter/o/48db29/32.png) [@owaisbakhtiar](https://forum.ionicframework.com/u/owaisbakhtiar)\
**Post date:** [May 4, 2017, 8:13am UTC](https://forum.ionicframework.com/t/ionic-build-android-failed/88742/10 "2017-05-04T08:13:25Z")

</div>

Yeah It worked… Thankyou Dear

---

<div class="post-metadata">

**Author:** ![gusgonnet](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gusgonnet/32/121606_2.png) [@gusgonnet](https://forum.ionicframework.com/u/gusgonnet)\
**Post date:** [September 2, 2018, 3:54am UTC](https://forum.ionicframework.com/t/ionic-build-android-failed/88742/11 "2018-09-02T03:54:01Z")

</div>

In case you are stuck with this issue in Ubuntu, please check a possible fix here:

> [@Error: Could not find gradle wrapper within android sdk. Might need to update yo ur Android SDK](https://forum.ionicframework.com/t/error-could-not-find-gradle-wrapper-within-android-sdk-might-need-to-update-yo-ur-android-sdk/22056/83):
>
> Ubuntu 14.04 fix Hi there, I was suffering from this issue and the things I tried from above didn’t help me. I ended up creating the templates directory and copying the gradle wrapper from an existing project to fix it. This was the error I got when running ionic cordova build android: $ ionic cordova build android \> ionic-app-scripts build --target cordova --platform android [20:22:51] ionic-app-scripts 3.1.8 \<build blah blah\> \> cordova build android ANDROID\_HOME=/home/gust/Android/Sdk …

Good luck,  
Gustavo.
