Androidx and databinding

I face the similar problem, the Data Binding library use the support library, some classes may conflict with the AndroidX. I have to remove the DataBinding for now.

I just read this release note, it said that this issue had been fixed, but I didn't see the effect.


Enabling AndroidX in the gradle.properties fixed this problem for me:

android.useAndroidX=true
android.enableJetifier=true

See https://developer.android.com/jetpack/androidx#using_androidx:

android.useAndroidX: When set to true, the Android plugin uses the appropriate AndroidX library instead of a Support Library. The flag is false by default if it is not specified.
android.enableJetifier: When set to true, the Android plugin automatically migrates existing third-party libraries to use AndroidX by rewriting their binaries. The flag is false by default if it is not specified.