http://i60.tinypic.com/51v880.jpg
platform-tools updated
my platforms are
android-5.1
android-17
If you have Android Studio installed, try to copy the templates directory of Android Studio
C:\Program Files\Android\Android Studio\plugins\android\lib\templates
to your android sdk tools directory:
C:\Android\sdk\tools
This did the trick for me :)
Update ANDROID_HOME
path from
C:/Users/CURRENT_USER/android-sdk/tools/
to
C:/Users/CURRENT_USER/android-sdk
This should solve the problem When you build it appends tool automatically to your ANDROID_HOME
therefore it searches for graddle inside tools/tools directory which is not present at all.
I had a similar problem with Android Studio running on a Mac.
I fixed it with the following commands:
cp -r /Applications/Android\ Studio.app/Contents/plugins/android/lib/templates ~/Library/Android/sdk/tools chmod a+x ~/Library/Android/sdk/tools/templates/gradle/wrapper/gradlew
I was having same error: could not find gradle wrapper within android sdk; When I was building ionic, but I solved it. I just downloaded Android SDK tools package and copied extracted file to C:\Users\CURRENT_USER\AppData\Local\Android\sdk and then issued: build ionic/cordova again.
it worked for me.
Got the same error in mac after updating the SDK Build Tools:
Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK. Looked here: /Users/xxx/Library/Android/sdk/tools/templates/gradle/wrapper
Here is the method how I solved it:
/Applications/Android Studio.app/Contents/plugins/android/lib
to /tools
chmod -R 777
Good luck!
Have you checked the path manually ? (C:/Users/Arsan/android-sdk/sdk/tools/...)
I had to update my ANDROID_HOME path for this to work (to android-sdk/tools, so removing "sdk" from the path).
Steven
update android project to cordova-android 6.2.1
cordova platform update android@6.2.1
for more details check the following links https://cordova.apache.org/announcements/2017/04/05/android-release.html
I had same issue... (2016-09-26, installed current version of Android SDK today)
ANALYSIS
I checked the installation and found out that the gradle wrapper is placed at a wrong location: ...\Android\SDK\tools\templates\gradle\wrapper\gradle\wrapper/[here_are_the_files]
Hence there is gradle/wrapper/gradle/wrapper in the end....
That folder conatins:
SOLUTION
Moving the content of that folder to the ...gradle/wrapper/-folder (hence 2 folders UPWARDS) solved my problem.
Hope that helps
I have same issue: could not find gradle wrapper within android sdk when i build ionic, but i was solve. I just download Android SDK tools package361 and copy extract file to C:\Users\CURRENT_USER\AppData\Local\Android\sdk and build ionic/cordova again. Download link https://dl.google.com/android/repository/tools_r25.2.3-windows.zip
None of the solutions worked for me as of today. My situation was that I got my Android studio updated. The most popular thing to replace the tools folder with the latest one wouldn't work for me. Infact is not required in some cases.
npm update -g cordova
did the trick for me.
Then I removed the platform and added it again.
ionic platform remove android
ionic platform add android
This works for me in Ionic. I am sure cordova platform remove/add android
will do the same stuff. Not tested though.
Working again !
set ANDROID_HOME in system variable as follows
C:\Program Files\Android\android-sdk
And set path in user variale as follows
appropriate jdkpath ; C:\Program Files\Android\android-sdk\tools;C:\Program Files\Android\android-sdk\platform-tools
If you reinstalled Android Studio, there may be an sdk1
and also sdk
folder in this path:
C:\Users\CURRENT_USER\AppData\Local\Android\
If you have two sdk folders you will have to delete one of them. Keep the one that contains the AVD Manager.exe and SDK Manager.exe.
This worked for me.
In my case, some error occured during the Android Studio installation, and the tools/templates
directory didn't exist. I fixed it by uninstalling and then reinstalling the Android SDK Tools, in the Android Studio Package Manager.
for my case: i figured out that templates folder is no longer available in the new sdk tools folder so:
Check whether your Android SDK having gradle/wrapper folder and having required files in that or not.If not update the Android SDK and try once.Make sure that you need set SDK root path in ANDROID_HOME in Environment variable in windows machines.