The way you defined the dependency, you applied the closure to files instead of compile.files('libs/poi-ooxml-schemas-3.12-20150511-a.jar'){ exclude group: 'stax', module: 'stax-api'}相反,您必须确保将闭包直接应用于 compile .Instead you have to make sure to apply the closure to compile directly.compile(files('libs/poi-ooxml-schemas-3.12-20150511-a.jar')){ exclude group: 'stax', module: 'stax-api'}但是我怀疑这根本没有必要.组和模块是Maven系统的一部分,并且JAR文件本身没有要排除的信息.But I doubt it's necessary at all. Groups and modules are part of the Maven system and the JAR file itself doesn't have this information to exclude. 这篇关于找不到Gradle DSL方法:' exclude()'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-28 04:53