Kodak Gifted
Kodak Gifted

Reputation: 81

Project not compiling after adding androidx.room:room-compiler:2.1.0-alpha05

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/" }
        }
    }

Upvotes: 0

Views: 2289

Answers (4)

Raul Espim
Raul Espim

Reputation: 11

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.

Upvotes: 0

Aleyam
Aleyam

Reputation: 1245

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

Upvotes: 0

Maurilio
Maurilio

Reputation: 1

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()).

Upvotes: 0

Nischal
Nischal

Reputation: 880

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

Upvotes: 1

Related Questions