且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

错误:无法在Android SDK中找到gradle包装器。可能需要更新您的Android SDK - Android

更新时间:2021-12-05 23:01:49

我刚遇到同样的问题。

I just experienced the same problem.

关于如何使用您和我错过的所有SDK工具安装(或升级)Android Studio的说明中可能存在遮挡,或者可能是由Studio的新版本,它不遵循与旧版本相同的文件约定。我倾向于后者,因为很多 SO帖子关于这个主题似乎指向一个名为android-sdk的文件夹的ANDROID_PATH,它没有出现在最新版本(2.3.0.8)中。

It may be an occlusion in the instructions regarding how to install (or upgrade) Android Studio with all the SDK Tools which both you and I missed or possibly a bug created by a new release of Studio which does not follow the same file conventions as the older versions. I lean towards the latter since many of the SO posts on this topic seems to point to an ANDROID_PATH with a folder called android-sdk which does not appear in the latest (2.3.0.8) version.

似乎有解决方法,我只是我的机器上工作了。这就是我所做的:

There appears to be a workaround though, which I just got to work on my machine. Here's what I did:


  • Android下载

  • 桌面上提取的邮政编码

  • 替换为C :\ Users\username \ AppData \ Local \ Android \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ :
  • Download tools_r25.2.3-windows.zip from Android Downloads.
  • Extracted zip on desktop
  • Replaced C:\Users\username\AppData\Local\Android\sdk\tools with extracted sub-folder tools/
  • In project folder:

$ cordova平台删除android

$ cordova平台添加android

$ cordova platforms remove android
$ cordova platforms add android

您可能还需要强制删除android中的node_modules。
希望这会有所帮助。

You may also need to force remove the node_modules in android. Hopefully this helps.