无法将提供的符号转换为文件或 URI

Cannot convert the provided notation to a File or URI

我在 运行 浓缩咖啡测试 ./gradlew connectedAndroidTest

时收到以下错误
> Task :app:fixStackFramesLiveDebugAndroidTest FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:fixStackFramesLiveDebugAndroidTest'.
> Cannot convert the provided notation to a File or URI: classes.jar (androidx.databinding:databinding-adapters:3.4.1).
  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.

app/build.gradle 包含以下内容

...
android {
  .....
  defaultConfig {
     ...
     testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
     ...
  }
  dataBinding {
     enabled = true
  }
}
...

不管 espresso 依赖性如何,我都会收到上述错误。有人可以帮忙解决这个问题吗?我是 android 和浓缩咖啡的新手。 我不确定我是否错过了信息。如有需要请告知。

我 运行 在将 gradle 更新到 3.4 后出现此错误。+ 在我降级到 3.3.2 后,我能够毫无问题地构建。

在启用了 Gradle Kotlin DSL 的 Android Studio 4.0 canary 4 上,我遇到了类似的错误:

Unable to resolve dependency for ':app@debug/compileClasspath': Cannot convert the provided notation to a File or URI: {dir=libs, include=[*.jar]}.

我从

更改构建脚本后
dependencies {
    implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
}

dependencies {
    implementation(fileTree(Pair("dir", "libs"), Pair("include", listOf("*.jar"))))
}

一切正常。卧槽