Home > Enterprise >  Android: Error: mergeDebugResources. | Could not resolve androidx.room:room-common:[2.3.0]. | Read t
Android: Error: mergeDebugResources. | Could not resolve androidx.room:room-common:[2.3.0]. | Read t

Time:11-01

Previously the app was working without any errors. Suddenly it started throwing errors when trying to compile and run the app through Android Studio.

Dependencies:

def retrofit_version = '2.9.0'
def room_version = "2.3.0"
def navigation_component = "2.3.5"

//Room
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
implementation "androidx.room:room-ktx:$room_version"

//Navigation component
implementation "androidx.navigation:navigation-runtime-ktx:$navigation_component"
implementation "androidx.navigation:navigation-fragment-ktx:$navigation_component"

// ViewModel and LiveData
implementation "android.arch.lifecycle:extensions:1.1.1"

// Firebase
implementation platform('com.google.firebase:firebase-bom:30.2.0')
implementation 'com.google.firebase:firebase-crashlytics'

implementation 'androidx.legacy:legacy-support-v4:1.0.0'

Error:

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':module_name:mergeDebugResources'.
> Could not resolve all task dependencies for configuration ':module_name:debugRuntimeClasspath'.
 > Could not resolve androidx.room:room-common:[2.3.0].
 Required by:
     project :module_name > androidx.room:room-runtime:2.3.0
     project :module_name > androidx.room:room-ktx:2.3.0
  > Failed to list versions for androidx.room:room-common.
     > Could not list versions using M2 pattern 'https://jcenter.bintray.com/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])(.[ext])'.
        > Could not get resource 'https://jcenter.bintray.com/androidx/room/room-common/'.
           > Could not GET 'https://jcenter.bintray.com/androidx/room/room-common/'.
              > Read timed out

* 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

BUILD FAILED in 1m 28s

CodePudding user response:

JCenter is actually down. You can check the status here : JCenter downtime impact on resolution

  • Related