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

I’m getting this error when I try to build Android. Any advice will be greatly appreciated!

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

Update your Android SDK.

Best just install Android Studio as it will take care of all of that.
Also make sure you are using the most recent Cordova and cordova-android versions.

1 Like

Helps half way, now getting this error:

/platforms/android/gradlew: Command failed with exit code ENOENT

And I’ve tried to update it, still gives me the exact same error. this error goes away only if I manualyl put these files in there, but the I get a new error, which I noted below.

What are β€œthese files”?
Did you install the Android stuff with Android Studio like I said?

I don’t know what files these are.

Yes, I’ve done all the installations from Android Studio (not via the terminal).



Which is it?

Post your ionic info and ionic cordova requirements output.

Hi Sujan! Thanks for your help!
With those files I don’t have a problem anymore. I’ve updated my ionic and cordova, and it went away. Now I’m stuck this this error ONLY:

Error: ../platforms/android/gradlew: Command failed with exit code ENOENT

Ioni info:

Your system information:

Cordova CLI: 6.5.0 
Ionic Framework Version: 2.0.1
Ionic CLI Version: 2.1.14
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 1.1.3
ios-deploy version: 1.9.0 
ios-sim version: 5.0.12 
OS: macOS Sierra
Node Version: v7.10.0
Xcode version: Xcode 8.3.2 Build version 8E2002

NPM version - 4.2.0

I’m not sure how to getionic cordova requirements, this command doesn’t work in my terminal.

Many thanks!

Update your Ionic CLI to a current version.

Until then: use cordova requirements.

Done! My CLI is now 3.4.0

I’ve removed the platform and added it again, then ran a cordova build command, and get these errors now:

cp: no such file or directory: /Users/podoliev/Library/Android/sdk/tools/templates/gradle/wrapper/gradlew
        cp: no such file or directory: /Users/podoliev/Library/Android/sdk/tools/templates/gradle/wrapper/gradle/wrapper
        chmod: File not found:
        sed: no such file or directory:
        Error: /Users/username/Documents/Development/app/platforms/android/gradlew: Command failed with
        exit code ENOENT

Your gradle is still not installed properly. Try it manually:

1 Like

Did everything, re-installed everything, the install processes went well, but still the same error…

I mentioned it a few times, but you never used it: cordova requirements

Here what I got from this:

Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: not installed 
Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable.
Gradle: not installed 
Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.
Looked here: /Users/user/Library/Android/sdk/tools/templates/gradle/wrapper

Requirements check results for ios:
Apple OS X: installed darwin
Xcode: installed 8.3.2
ios-deploy: installed 1.9.0
CocoaPods: installed 
Error: Some of requirements check failed

β”‚ Update available: 7.0.1 (current: 6.5.0) β”‚
β”‚ Run npm install -g cordova to update.    β”‚

Yep, pretty clear. Something is broken with your Android/Gradle. Without fixing this, the error will stay.

Yes, that’s pretty clear, I just can’t find a way to do it. I’ve been at it for 4 days straight now.

Old thread, but just in case someone else is stuck. I came across this on an older project and solved it by updating cordova globally, and the local platform package :

npm install -g cordova
cd my_project
cordova platform update android

Cordova guidelines (

Doing so also updated the my gradle config which somehow had gotten out of date.

1 Like