Проблема связана с библиотеками AndroidX.Перенесите ваши библиотеки поддержки на AndroidX.В AndroidStudio вы можете использовать меню Refactor> Migrate to AndroidX , чтобы сделать это вручную.Следите за изменениями с помощью VCS (например, git), чтобы увидеть, что происходит.
Также вы можете сделать это вручную, изменив зависимости gradle на:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.google.firebase:firebase-core:17.0.0'
implementation 'com.google.firebase:firebase-database:18.0.0'
implementation 'com.firebaseui:firebase-ui-database:0.4.1'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
}
apply plugin: 'com.google.gms.google-services'
Затем найдите все старые зависимостиимпорт с новыми.Размещение этих флагов в вашем gradle.properties
может исправить некоторые относительные проблемы:
android.enableJetifier=true
android.useAndroidX=true