16

Yep, i searched about this but nothing, just things about the ANDROID_HOME path, but in my case i don't think this is the real problem. When i try to do ionic build android i get this error:

Error: Could not find gradle wrapper within android sdk. Might need to update yo ur Android SDK. Looked here: C:\Android\sdk\tools\templates\gradle\wrapper

And found that in C:\Android\sdk\tools i dont have "templates" folder, just this:

sdk tools folder

I see gradle wrapper only in this path C:\Android\sdk\temp\ToolPackage.old01\templates\gradle\wrapper

Why i don't have Gradle in my sdk folder? i am missing something? in SDK manager i have this installed:

enter image description here

Thanks in advance

2

9 Answers 9

26

Had exactly the same problem. This thread points out the reason behind it, and this one actually shows what to do.

In short:

  • in Android Studio uninstall Android SDK Tools
  • Download tools_r25.2.3-yourOPsystem.zip from Android Downloads. Basicly same thing, older version.
  • insert downloaded extracted tools folder in Android/sdk/ folder
    (MAC: /Users/username/Library/Android/sdk/tools
    Win: C:\Users\username\AppData\Local\Android\sdk\tools)

  • In project folder run:

$ cordova platforms remove android

$ cordova platforms add android

Sign up to request clarification or add additional context in comments.

3 Comments

This is totally different, the question is from 2015 and this problem is new. The questions you link are for the new problem and your fix too.
You are indeed correct about it. So anyone who is looking for a fix for 2015 problem, should keep looking, others may find relief here.
for those who don't have android studio but just the sdk manager tool, type in "sdkmanager tools" what you need will be installed
8

On Linux android studio version-162.3871768-linux copy paste

\Android Studio\plugins\android\lib\templates\

to Sdk/tools/

1 Comment

you're a life saver
5

You need to update ANDROID_HOME variable to point the android-sdk folder https://stackoverflow.com/a/32507036/344895

1 Comment

No problem. The solution I reference in the answer helped me when I faced with the same issue
2

you have to upgrade your cordova library

cordova platform update [email protected]

Comments

1

I tested upgrade cordova to version 6.5 and extract tools SDK. Nothing helps. In my case I have Android Studio installation.

SOLUTION: Please find file gradle-wrapper.jar in your Android Studio installation (in may case ..\Android Studio\plugins\android\lib\templates\gradle\wrapper\gradle\wrapper\ ). Then copy whole directory templates to SDK location in subfolder tools.

Comments

0

Set ANDROID_HOME to the SDK Path displayed in your Android SDK Manager. The default location is C:\Program Files (x86)\Android\android-sdk if you didn't change it.

Comments

0

go to https://developer.android.com/studio/index.html cheak Download Option and download tools only extact file and copy the templates folder and paste in C:\Users(yourunername)\AppData\Local\Android\sdk\tools

Comments

0

update your sdk tools download tools_r25.2.3-yourOPsystem.zip. [direct download link][1]

/Users/username/Library/android/sdk/tools

1 Comment

please use this link.. google.com/…
0

You cant find gradle in latest sdk. So try to install it manually. Follow this link

https://gradle.org/install

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.