Android 无法将提供的符号转换为文件或URI
运行浓缩咖啡测试时出现以下错误。/gradlew connectedAndroidTest app/build.gradle包含以下内容Android 无法将提供的符号转换为文件或URI,android,android-studio,android-espresso,android-databinding,android-espresso-recorder,Android,Android Studio,Android Espresso,Android Databinding,Android Espresso Recorder,运行浓缩咖啡测试时出现以下错误。/gradlew connectedAndroidTest app/build.gradle包含以下内容 ... android { ..... defaultConfig { ... testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" ... } dataBinding { enabled = true } } ...
...
android {
.....
defaultConfig {
...
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
...
}
dataBinding {
enabled = true
}
}
...
不考虑咖啡的依赖性,我得到了上面的错误。有人能帮忙解决这个问题吗。我不熟悉安卓和浓缩咖啡。
我不确定我是否遗漏了信息。如果需要,请告知。我在将gradle升级到3.4之后遇到了这个错误。+在我降级到3.3.2之后,我能够毫无问题地构建。我在将gradle升级到3.4之后遇到了这个错误。+在我降级到3.3.2之后,我能够毫无问题地构建。在启用gradle Kotlin DSL的Android Studio 4.0金丝雀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"))))
}
到
一切正常。WTF.在启用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"))))
}
到
一切正常。WTF.将com.android.tools.build:gradle:3.4.2更改为com.android.tools.build:gradle:3.2.1有效。将com.android.tools.build:gradle:3.4.2更改为com.android.tools.build:gradle:3.2.1有效。