javaandroidkotlin

:app:dataBindingMergeDependencyArtifactsDebug' Error


What is causing the problem? I am encountering such an error in my application sale. I couldn't find anything exactly as a solution.

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

Solution

  • As @Narendra_Nath said, it is because of the bintray dependencies and Jcenter shutting down. you can refer to this article https://blog.gradle.org/jcenter-shutdown

    the solution that worked for me is changing the repositories in the (Top-level build.gradle) to

        buildscript {
          repositories {
            google()
            mavenCentral()
            maven {
            url "https://repo.spring.io/release"
            }
            maven {
            url "https://repository.jboss.org/maven2"
          } }