Gradle Plugin was not found in any of the following sources

  • 导入了新的 Gradle 项目,在做 sync 刷新的时候,一直提示报错

报错代码

1
2
3
Plugin [id: 'org.springframework.boot', version: '2.1.3.RELEASE'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'org.springframework.boot:org.springframework.boot.gradle.plugin:2.1.23.RELEASE') Searched in the following repositories: Gradle Central Plugin Repository

报错截图

解决方法

  • 选择使用本地的 Gralde : Use Local Gralde distrbution
  • 关闭离线文件: Offline work

    如有必要的情况下,请针对 Service directory path 的路径下的 .gradle 文件夹目录也进行删除

  • 再针对 Gradle 项目进行刷新,重新加载即可