在sdk中缺少Cordova gradle包装器 [英] Cordova gradle wrapper missing in android sdk

查看:170
本文介绍了在sdk中缺少Cordova gradle包装器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在windows7 x64上,安装了今天最新的android sdk studio稳定版(通过android studio bundle,因为它现在显然已经一起发货)。我已经正确配置了环境变量,如上所示。



这是我在发出以下命令时得到的结果

  $ cordova build android 

ANDROID_HOME = G:\ installs\Android\sdk
JAVA_HOME = C:\Program Files \ Java \ _jdk1.8.0_121
错误:无法在Android SDK中找到gradle包装器。可能需要更新您的Android SDK。
查看此处:G:\ installs \ Android \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
$ b

事实上,我的sdk安装中甚至不存在templates目录。



我已经尝试了这些建议(设置正确的路径,卸载/重新安装)此问题这里但没有任何内容适用于我的情况,我发现手动复制和粘贴软件包并不是真正的解决方案,因为有一个软件包管理器。



如果有人在今天的Android安装中有答案,我将非常感激。

解决方案

如果仍然无效,则从Android Studio安装文件夹中复制 gradle \wrapper 中的所有文件


C:\程序文件\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ >并将其粘贴到您的Android SDK gradle \wrapper 中,然后运行相同的命令。


E:\ android-sdk \tools\templates\gradle \wrapper



I'm on windows7 x64, installed today's latest stable release of android sdk studio (through android studio bundle, since it's shipped together now apparently). I have properly configured the environment variables as you'll see above.

This is what I get when issuing the following command

$ cordova build android

ANDROID_HOME=G:\installs\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 your Android SDK.
Looked here: G:\installs\Android\sdk\tools\templates\gradle\wrapper

And indeed, the "templates" directory doesn't even exist in my sdk install.

I've already tried the suggestions (setting the right path, uninstall/reinstall) of this question here but nothing applies to my case, and I find that manually copying and pasting packages is not really a solution, since there's a package manager in place.

If anybody has an answer as of today's android install, would be very much appreciated.

解决方案

If still not working then copy all file from gradle\wrapper from Android Studio installation folder

C:\Program Files\Android\Android Studio\plugins\android\lib\templates\gradle\wrapper

and paste it in your Android SDK gradle\wrapper then run same command.

E:\android-sdk\tools\templates\gradle\wrapper

这篇关于在sdk中缺少Cordova gradle包装器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆