android数据绑定生成的类错误:包不存在
我将我的项目迁移到androidx,代码没有错误,但是一旦我尝试重新构建项目,我在生成的类中得到以下错误。app/build/generated/data\u binding\u base\u class\u source\u out/debug/dataBindingGenBaseClassesDebug 我已经检查了我的gradle文件,所有依赖项都更新为androidx。这是代码android数据绑定生成的类错误:包不存在,android,Android,我将我的项目迁移到androidx,代码没有错误,但是一旦我尝试重新构建项目,我在生成的类中得到以下错误。app/build/generated/data\u binding\u base\u class\u source\u out/debug/dataBindingGenBaseClassesDebug 我已经检查了我的gradle文件,所有依赖项都更新为androidx。这是代码 dependencies { implementation "com.github.hotchemi:
dependencies {
implementation "com.github.hotchemi:permissionsdispatcher:${permissionsDispatcherVersion}"
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
annotationProcessor "com.github.hotchemi:permissionsdispatcher-processor:${permissionsDispatcherVersion}"
implementation fileTree(include: ['*.jar'], dir: 'libs')
//noinspection GradleCompatible
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.cocosw:bottomsheet:1.4.0'
implementation 'com.isseiaoki:simplecropview:1.1.4'
implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
implementation 'com.github.florent37:singledateandtimepicker:1.2.2'
implementation 'de.hdodenhof:circleimageview:2.0.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.amitshekhar.android:android-networking:1.0.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'org.jsoup:jsoup:1.8.1'
implementation 'com.github.hani-momanii:SuperNova-Emoji:1.1'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.ToxicBakery.viewpager.transforms:view-pager-transforms:1.2.32@aar'
implementation 'com.google.firebase:firebase-messaging:20.1.0'
implementation 'com.google.firebase:firebase-core:17.2.2'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.kyleduo.switchbutton:library:1.4.5'
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.1'
implementation("com.google.android.libraries.places:places-compat:1.0.0")
implementation("com.schibstedspain.android:leku:5.0.0") {
exclude group: 'com.google.android.gms'
exclude module: "play-services-places"
}
implementation 'com.gordonwong:material-sheet-fab:1.2.1'
implementation 'com.google.firebase:firebase-storage:19.1.0'
implementation 'com.google.firebase:firebase-auth:19.2.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
}
例如
错误:包androidx.appbarlayout.widget不存在
您现在需要使用不同的库,即com.google.android.material.appbar.AppBarLayout
请查找已替换的,以支持应用程序中的AndroidX。谢谢,在更新到AndroidX类映射后,它运行良好
dependencies {
implementation "com.github.hotchemi:permissionsdispatcher:${permissionsDispatcherVersion}"
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
annotationProcessor "com.github.hotchemi:permissionsdispatcher-processor:${permissionsDispatcherVersion}"
implementation fileTree(include: ['*.jar'], dir: 'libs')
//noinspection GradleCompatible
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.cocosw:bottomsheet:1.4.0'
implementation 'com.isseiaoki:simplecropview:1.1.4'
implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
implementation 'com.github.florent37:singledateandtimepicker:1.2.2'
implementation 'de.hdodenhof:circleimageview:2.0.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.amitshekhar.android:android-networking:1.0.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'org.jsoup:jsoup:1.8.1'
implementation 'com.github.hani-momanii:SuperNova-Emoji:1.1'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.ToxicBakery.viewpager.transforms:view-pager-transforms:1.2.32@aar'
implementation 'com.google.firebase:firebase-messaging:20.1.0'
implementation 'com.google.firebase:firebase-core:17.2.2'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.kyleduo.switchbutton:library:1.4.5'
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.1'
implementation("com.google.android.libraries.places:places-compat:1.0.0")
implementation("com.schibstedspain.android:leku:5.0.0") {
exclude group: 'com.google.android.gms'
exclude module: "play-services-places"
}
implementation 'com.gordonwong:material-sheet-fab:1.2.1'
implementation 'com.google.firebase:firebase-storage:19.1.0'
implementation 'com.google.firebase:firebase-auth:19.2.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
}