0

Application gradle file and Project gradle file.

Error: cannot find symbol class DataBindingComponent

    dependencies 
    {
        implementation 'androidx.room:room-runtime:2.1.0-alpha05'
        annotationProcessor 'androidx.room:room-compiler:2.1.0-alpha05'
  
    }
-----------------------------------------------------------------------------
    allprojects {
        repositories {
            jcenter()
            maven { url "https://jitpack.io" }
            google()
            maven { url "https://kotlin.bintray.com/kotlinx/" }
        }
    }
Community
  • 1
  • 1
  • Welcome to StackOverflow! Please provide the error as well. – Suleyman Mar 14 '19 at 23:37
  • Error during compilation "Note: Failed to read get kotlin metadata for [Ljava.lang.Object;@679b84" and "error: cannot find symbol class DataBindingComponent" – Kodak Gifted Mar 14 '19 at 23:42

4 Answers4

1

Add maven { url "https://kotlin.bintray.com/kotlinx/" } to your project repositories.

Room 2.1.0-alpha05 depends on the kotlinx-metadata-jvm artifact which is not currently available in Maven Central

Refer Official doc

Nischal
  • 870
  • 1
  • 10
  • 16
0

I got rid of this error upgrading the gradle build plugin to 3.3.2:

dependencies {
    classpath 'com.android.tools.build:gradle:3.3.2'
    classpath 'com.google.gms:google-services:4.2.0'
    classpath 'io.fabric.tools:gradle:1.27.1'
}

That version will produce some warnings caused by io.fabric plugin, if you have been using it (see API 'variant.getExternalNativeBuildTasks()' is obsolete and has been replaced with 'variant.getExternalNativeBuildProviders()).

Maurilio
  • 1
  • 1
0

hey i have had a similar problem, this is the displayed error:

Searched in the following locations:
  - file:/Users/4leyam/Library/Android/sdk/extras/m2repository/org/jetbrains/kotlinx/kotlinx-metadata-jvm/0.0.5/kotlinx-metadata-jvm-0.0.5.pom
  - file:/Users/4leyam/Library/Android/sdk/extras/m2repository/org/jetbrains/kotlinx/kotlinx-metadata-jvm/0.0.5/kotlinx-metadata-jvm-0.0.5.jar
  - file:/Users/4leyam/Library/Android/sdk/extras/google/m2repository/org/jetbrains/kotlinx/kotlinx-metadata-jvm/0.0.5/kotlinx-metadata-jvm-0.0.5.pom
  - file:/Users/4leyam/Library/Android/sdk/extras/google/m2repository/org/jetbrains/kotlinx/kotlinx-metadata-jvm/0.0.5/kotlinx-metadata-jvm-0.0.5.jar
  - file:/Users/4leyam/Library/Android/sdk/extras/android/m2repository/org/jetbrains/kotlinx/kotlinx-metadata-jvm/0.0.5/kotlinx-metadata-jvm-0.0.5.pom
  - file:/Users/4leyam/Library/Android/sdk/extras/android/m2repository/org/jetbrains/kotlinx/kotlinx-metadata-jvm/0.0.5/kotlinx-metadata-jvm-0.0.5.jar
  - https://dl.google.com/dl/android/maven2/org/jetbrains/kotlinx/kotlinx-metadata-jvm/0.0.5/kotlinx-metadata-jvm-0.0.5.pom
  - https://dl.google.com/dl/android/maven2/org/jetbrains/kotlinx/kotlinx-metadata-jvm/0.0.5/kotlinx-metadata-jvm-0.0.5.jar
  - https://jcenter.bintray.com/org/jetbrains/kotlinx/kotlinx-metadata-jvm/0.0.5/kotlinx-metadata-jvm-0.0.5.pom
  - https://jcenter.bintray.com/org/jetbrains/kotlinx/kotlinx-metadata-jvm/0.0.5/kotlinx-metadata-jvm-0.0.5.jar
Required by:
    project :app > androidx.room:room-compiler:2.1.0-alpha05

the provisional solution i found is to downgrade the room_version to

 def room_version = "2.1.0-alpha04"

please share if there is a better solution

Aleyam
  • 1,215
  • 1
  • 14
  • 14
0

You can try to use the "2.4.0-alpha05" version of room, in my case it always worked without any bugs. At least until now (2023) I haven't needed to change the version. I don't have any links to the documentation or anything like that to confirm my answer, I'm just trying to help you based on my own experiences. Worth trying. I hope this helps.

  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 07 '21 at 09:10