I'm getting a lot of errors with data binding errors after migrating to AndroidX (Refactor > Migrate to AndroidX).
error: cannot find symbol
@Nullable ViewGroup root, boolean attachToRoot, @Nullable DataBindingComponent component) {
^
symbol: class DataBindingComponent
location: class ActivityInfoBinding
I'm using Android Studio 3.2 Beta 2
My dependencies:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
implementation 'androidx.cardview:cardview:1.0.0-beta01'
implementation 'com.google.android.material:material:1.0.0-beta01'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha1'
implementation "com.squareup.retrofit2:retrofit:$versions.retrofit"
implementation "com.squareup.retrofit2:converter-gson:$versions.retrofit"
implementation 'androidx.room:room-runtime:2.0.0-beta01'
kapt 'androidx.room:room-compiler:2.0.0-beta01'
implementation "androidx.core:core-ktx:$versions.ktx"
implementation 'androidx.lifecycle:lifecycle-runtime:2.0.0-beta01'
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0-beta01'
kapt 'androidx.lifecycle:lifecycle-compiler:2.0.0-beta01'
implementation "me.tatarka.bindingcollectionadapter2:bindingcollectionadapter:$versions.binding_collection_adapter"
implementation "me.tatarka.bindingcollectionadapter2:bindingcollectionadapter-recyclerview:$versions.binding_collection_adapter"
implementation "com.jakewharton.threetenabp:threetenabp:$versions.threetenabp"
implementation "com.google.dagger:dagger:$versions.dagger"
kapt "com.google.dagger:dagger-compiler:$versions.dagger"
kapt "com.google.dagger:dagger-android-processor:$versions.dagger"
implementation "com.google.dagger:dagger-android-support:$versions.dagger"
implementation "com.airbnb.android:lottie:$versions.lottie"
implementation "com.github.bumptech.glide:glide:$versions.glide"
implementation "com.jakewharton.timber:timber:$versions.timber"
implementation "com.crashlytics.sdk.android:crashlytics:$versions.crashlytics"
implementation "com.google.firebase:firebase-core:$versions.firebase_core"
testImplementation "junit:junit:$versions.junit"
androidTestImplementation 'androidx.test:runner:1.1.0-alpha3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha3'
}
Updating to latest Android Studio and re-importing the project fixed my issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With