java Intellij 错误:原因:org.gradle.internal.component.external.model.DefaultModuleComponentSelector

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/39704047/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-03 04:35:30  来源:igfitidea点击:

Intellij Error:Cause: org.gradle.internal.component.external.model.DefaultModuleComponentSelector

javaandroidspringmavenbuild.gradle

提问by Kamil Nekanowicz

I added maven url to my gradle:

我将 maven url 添加到我的 gradle 中:

repositories {

    mavenCentral()
    maven{
        url "https://oss.sonatype.org/content/repositories/snapshots/"
    }
}

and library to spring boot app and I got:

和库到 spring 启动应用程序,我得到:

Error:Cause: org.gradle.internal.component.external.model.DefaultModuleComponentSelector

错误:原因:org.gradle.internal.component.external.model.DefaultModuleComponentSelector

and library:

和图书馆:

compile 'com.github.jonaslins:fiware-orion-library:0.0.1-SNAPSHOT'

编译'com.github.jonaslins:fiware-orion-library:0.0.1-SNAPSHOT'

I use Intellij 2016

我使用 Intellij 2016

Hot to fix it? I added same lib to Android studio and it works

热修复吗?我向 Android Studio 添加了相同的库,它可以工作

回答by vargen_

I had the same issue. It turned out that one of the dependencies could not be resolved from mavencentral. I changed the version and then the build succeeded.

我遇到过同样的问题。事实证明,mavencentral 无法解析其中一个依赖项。我更改了版本,然后构建成功。