![](/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.