找不到Gradle DSL方法:complie()只用jopendocument

时间:2016-02-28 13:42:29

标签: java intellij-idea gradle

我试图将Gradle用于这个' org.jopendocument:jOpenDocument:1.3b1'获取此错误:

此Gradle文件(1)因此错误而失败:

Error:(21, 0) Gradle DSL method not found: 'complie()'

Possible causes:

The project '' may be using a version of Gradle that does not contain the method.

Open Gradle wrapper 

file The build file may be missing a Gradle plugin.
Apply Gradle plugin

Gradle文件(1)

dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.11'

    ..//
    compile 'org.mariadb.jdbc:mariadb-java-client:1.1.7'
    complie 'org.jopendocument:jOpenDocument:1.3b1'

}

但是将此项添加到测试compile 'org.apache.felix:org.apache.felix.scr.annotations:1.9.12'并且效果很好

Gradle文件(2)

dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.11'

    ..//
    compile 'org.mariadb.jdbc:mariadb-java-client:1.1.7'
    //complie 'org.jopendocument:jOpenDocument:1.3b1'
    compile 'org.apache.felix:org.apache.felix.scr.annotations:1.9.12'
}

但是想使用complie' org.jopendocument:jOpenDocument:1.3b1',不起作用,我已经处理过:

  • ' org.jopendocument:jOpenDocument:1.3b1'
  • ' org.jopendocument:jOpenDocument:1.3'
  • ' org.jopendocument:jOpenDocument:1 +'
  • ' org.jopendocument:jOpenDocument:1.1'

但它不起作用,有人可以告诉我,我做错了什么

http://mvnrepository.com/artifact/org.jopendocument/jOpenDocument/1.3b1 http://repo.gradle.org/gradle/repo/org/jopendocument/jOpenDocument/1.3/

1 个答案:

答案 0 :(得分:1)

似乎打字错误:您需要<input type = "file">,而不是compile

第一个gradle文件中的那一行: complie