迁移到 AndroidX(重构 > 迁移到 AndroidX)后,我遇到了很多数据绑定错误。
error: cannot find symbol
@Nullable ViewGroup root, boolean attachToRoot, @Nullable DataBindingComponent component) {
^
symbol: class DataBindingComponent
location: class ActivityInfoBinding
我正在使用 Android Studio 3.2 Beta 2
我的依赖:
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'
}