Out of the sudden I was not able to build and run my cordova projects on my android phone by getting “Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.” .
It was not a normal SDK issue. after looking around it turned out that Google has changed the location of gardle wrapper in their sdk which was causing cordova not being able to find it. thus trying to run / build the apk was giving out the below output:
ANDROID_HOME=/Users/mahdi/Library/Android/sdk JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK. Looked here: /Users/mahdi/Library/Android/sdk/tools/templates/gradle/wrapper
Blame is on Google but it seems Apache has fixed this issue in the next version of android-platform for cordova. so if you are one of the victims of errors above you can do this to solve your problem.
# cordova platform rm android # cordova platform add https://github.com/apache/cordova-android
lets hope this helps some people out there, stuck searching over a solution like me.
Incoming search terms:
- mac cli Error: Could not find gradle wrapper within Android SDK Might need to update your Android SDK
- Could not find gradle wrapper within Android SDK Might need to update your Android SDK
- cordova Gradle: not installed
- Error: Could not find gradle wrapper within Android SDK Might need to update your Android SDK
- could not find gradle wrapper within android sdk windows
- could not find gradle wrapper within android copy templates
- cordova wrapper gradle
- cordova 7 gradle wrapper fix
- cannot find gradle wrapper within android sdk mac
- what wuld be the problem when android studio cant find the graddle wrapper file
thanks
OMG…I was having the similar issue and scratching my head since hour…
Thanks a lot. Issue does get resolved.
Awesome – Instant fix and very useful! Thanks
It work in windows too! Thanks!!
Thanks a lot! it solved my issue instantly. I spend houres with searching
This worked, fascinating.