Reputation: 115
I am trying to build android project based on Cordova but I have error as follows:
Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.
I am using cordova 6.4.0
.
Please help me to solve this issue.
Upvotes: 2
Views: 1412
Reputation: 453
just execute the following commands.
npm install -g cordova; cordova platform rm android; cordova platform add android;
It will update you cordova to latest version and remove and add the platform newly.
Thanks
Upvotes: 1
Reputation: 6053
Actually, there is an issue where who are using Cordova older versions(eg. Cordova 6.4.0
), From android SDK Tools
, Revision 25.2.3
(November 2016
) onwards they have removed templates folder from the tools which are required to create build till [email protected].
Use following steps it will help you,
..\AppData\Local\Android\sdk\tools
with extracted sub-folder of tools/
(templates
folder)And now do the build process again, your issue will be resolved.
$ cordova build android / cordova run android
Also please check the similar type of question from here.
Hopes this will help you !!
Upvotes: 1
Reputation: 115
Solution for above question
Those who are using cordova older versions(eg. cordova 6.4.0
), i.e. Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK so solution for this is as follows
Download the tools_r25.2.3-macosx.zip
from https://developer.android.com/studio/releases/sdk-tools.html link
Extract it and copy the templates folder from it
Go to android sdk path then go in tools folder
Paste the templates folder here
And now do the build process again, your issue will be resolved.
Why this issue From SDK Tools, Revision 25.2.3 (November 2016)
onwards they have removed templates folder from the tools which is required to create build till [email protected].
Upvotes: 0