Intellij idea IntelliJ中的Gradle导入错误
我已经习惯了Maven,现在我正尝试在IntelliJ中导入一个基于Gradle的项目:Intellij idea IntelliJ中的Gradle导入错误,intellij-idea,gradle,Intellij Idea,Gradle,我已经习惯了Maven,现在我正尝试在IntelliJ中导入一个基于Gradle的项目: apply plugin: 'idea' subprojects { apply plugin: 'java' apply plugin: 'idea' apply plugin: 'eclipse' repositories { mavenCentral() } dependencies { compile 'javax
apply plugin: 'idea'
subprojects {
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
repositories {
mavenCentral()
}
dependencies {
compile 'javax.ws.rs:jsr311-api:1.1.1'
compile 'com.google.guava:guava:r09'
compile 'com.sun.jersey:jersey-server:1.17.1'
compile 'com.sun.jersey:jersey-core:1.17.1'
compile 'com.sun.jersey:jersey-servlet:1.17.1'
compile 'com.sun.jersey:jersey-json:1.17.1'
compile 'com.fasterxml.jackson.core:jackson-core:2.2.1'
compile 'com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.2.1'
compile 'com.fasterxml.jackson.core:jackson-databind:2.2.1'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.2.1'
compile 'commons-io:commons-io:2.4'
testCompile 'junit:junit:4.11'
}
group = 'com.kinvey'
version = '0.1.0'
// Checkstyle
apply plugin: 'checkstyle'
checkstyle {
ignoreFailures = true
configFile = rootProject.file('codequality/checkstyle.xml')
}
// FindBugs
apply plugin: 'findbugs'
findbugs {
ignoreFailures = true
}
// PMD
apply plugin: 'pmd'
//tasks.withType(Pmd) { reports.html.enabled true }
// apply plugin: 'cobertura'
// cobertura {
// sourceDirs = sourceSets.main.java.srcDirs
// format = 'html'
// includes = ['**/*.java', '**/*.groovy']
// excludes = []
// }
}
下面是我导入它的方式和错误:
导入项目的方式可能有什么问题?我看到的错误表明您正在配置eclipse插件,但我在构建脚本中没有看到任何eclipse配置。如果有,你能把它贴出来吗?另外,请注意,您只需要在顶部应用idea插件一次,然后确保运行
gradle idea
,只“打开”项目,而不是创建新的或导入。1。尝试删除“apply plugin:'eclipse'”行。2.尝试不同版本的Gradle。例如,3.0可能有效,而3.1可能无效。用于操纵渐变版本。3.别忘了在