![](/img/trans.png)
[英]Execution failed for task ':app:dataBindingMergeDependencyArtifactsDebug'
[英]:app:dataBindingMergeDependencyArtifactsDebug' Error
是什么导致了这个问题? 我在我的应用程序销售中遇到了这样的错误。 我找不到任何东西作为解决方案。
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:dataBindingMergeDependencyArtifactsDebug'.
> Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not resolve androidx.core:core-ktx:+.
Required by:
project :app
> Skipped due to earlier error
> Failed to list versions for androidx.core:core-ktx.
> Unable to load Maven meta-data from https://dl.bintray.com/kotlin/kotlin-eap/androidx/core/core-ktx/maven-metadata.xml.
> Could not get resource 'https://dl.bintray.com/kotlin/kotlin-eap/androidx/core/core-ktx/maven-metadata.xml'.
> Could not GET 'https://dl.bintray.com/kotlin/kotlin-eap/androidx/core/core-ktx/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
你需要正确声明你的依赖"androidx.core:core-ktx:$core_version"
这是因为 bintray 支持现在不再存在。 Go 到您的项目级别build.gradle
并在allprojects
和repositories
部分中注释掉 bintray 依赖项
正如@Narendra_Nath 所说,这是因为 bintray 依赖项和 Jcenter 关闭。 可以参考这篇文章https://blog.gradle.org/jcenter-shutdown
对我有用的解决方案是将(顶级 build.gradle)中的存储库更改为
buildscript {
repositories {
google()
mavenCentral()
maven {
url "https://repo.spring.io/release"
}
maven {
url "https://repository.jboss.org/maven2"
} }
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.