【问题标题】:Error when Importing an existing gradle project into IntelliJ IDEA将现有 gradle 项目导入 IntelliJ IDEA 时出错
【发布时间】:2018-07-11 12:38:54
【问题描述】:

我是 IntelliJ IDEA 的新手,我正在尝试在我的桌面上导入现有的 gradle 项目,我选择了导入项目图标,然后我给出了我想要导入的项目的 build.gradle 文件的路径,但是我收到此错误:

Plugin [id: 'com.gradle.build-scan', version: '1.9'] 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 'com.gradle.build-scan:com.gradle.build-scan.gradle.plugin:1.9')

Searched in the following repositories: Gradle Central Plugin Repository

谁能帮忙解决这个问题?

【问题讨论】:

    标签: java gradle intellij-idea intellij-15


    【解决方案1】:

    确保您要导入的 gradle 项目的版本是兼容的或相同的版本(后者是最可取的,因为它可以保持干净)。有些插件不向后兼容,所以你必须检查 gradle 的网站。

    这里有一个关于 gradle 的构建扫描插件的链接,可能会有所帮助:https://plugins.gradle.org/plugin/com.gradle.build-scan/1.12.1

    祝你好运!

    【讨论】:

    • “gradle 项目的版本”是什么意思,如何检查?
    • 像程序一样,库通常会经常更新以保持运行良好(或者像库运行一样好,因为它们很痛苦)。对于 gradle,我不确定他们如何存储库导入,但我知道对于 maven 等类似项目,它们存储在 json 文件中。
    猜你喜欢
    • 2022-11-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-10-23
    • 1970-01-01
    • 1970-01-01
    • 2011-10-12
    相关资源
    最近更新 更多