Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK. Looked here: C:\Users\Administrator\AppData\Local\Android\sdk\tools\templates\gradle\wrapper
Posted on 2017-04-23 14:55 漂泊雪狼 阅读(6881) 评论(0) 编辑 收藏 举报在Windows7上运行 “cordova build Android” 报错,如下:
C:\test\hello> cordova build android
ANDROID_HOME=C:\Users\administrator\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_121
Error: Could not find gradle wrapper within Android SDK. Might need to update yo
ur Android SDK.
Looked here: C:\Users\administrator\AppData\Local\Android\sdk\tools\templates\gradle\wrapper
解决办法
下载 Android SDK tools package(https://dl.google.com/android/repository/tools_r25.2.3-windows.zip)
进入 C:\Users\\AppData\Local\Android\sdk目录
备份tools目录
将压缩包中的tools目录解压到这个目录下
进入工程目录,再次运行 “cordova build android”。