Fix Cordova issue with Gradle Wrapper missing From Android SDK in MAC.

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:

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.

lets hope this helps some people out there, stuck searching over a solution like me.

Incoming search terms:

  • Could not find gradle wrapper within Android SDK Might need to update your Android SDK
  • mac cli Error: Could not find gradle wrapper within Android SDK Might need to update your Android SDK
  • cordova 7 gradle wrapper fix
  • could not find gradle wrapper within android copy templates
  • could not find gradle wrapper within android sdk windows
  • gradle not found cordova
  • mac android gradle wrapper miss
  • mac could not find gradle wrapper within android sdk
  • template gradle wrapper

Reindex Spotlight and All My Files

Spotlight and All My Files can be a real time saver tool on mac but if you are a developer with lots of junk scripts within your project that can go messy. luckily we are able to exclude folders and files in spotlight privacy settings, but adding them to the privacy section will not immediately remove them from spotlight index.

The solution to this is to manually force spotlight to rebuild the index by executing following command in terminal:

running this alone is not enough tough. make sure you restart your mac and it should help with spotlight respecting your privacy setting.