请,我正在将gradle 2.1项目转换为6.0,但是出现此错误。
Could not resolve all dependencies for configuration ':driver'.
> Cannot convert the provided notation to a File or URI: classesDirs.
The following types/formats are supported:
- A String or CharSequence path, for example 'src/main/java' or '/usr/include'.
- A String or CharSequence URI, for example 'file:/usr/include'.
- A File instance.
- A Path instance.
- A Directory instance.
- A RegularFile instance.
- A URI or URL instance.
运行时
configurations.driver.each {File file ->
loader.addURL(file.toURL())
}
驱动程序是一个自定义配置,定义为
configurations {
driver
}
dependencies {
driver 'org.drizzle.jdbc:drizzle-jdbc:1.3'
}
请问如何解决?
答案 0 :(得分:0)
通过使用
修复sourceSets.main.output.resourcesDir = sourceSets.main.java.outputDir
sourceSets.test.output.resourcesDir = sourceSets.test.java.outputDir
代替
sourceSets.main.output.resourcesDir = sourceSets.main.output.classesDirs
sourceSets.test.output.resourcesDir= sourceSets.test.output.classesDirs