I have already updated gradle.properties
file adding:
android.useAndroidX=true
android.enableJetifier=true
But i have this error:
e: [kapt] An exception occurred: android.databinding.tool.util.LoggedErrorException: failure, see logs for details.
AndroidX Error: Both old and new data binding packages are available in dependencies. Make sure you've setup jettifier for any data binding dependencies and also set android.useAndroidx in your gradle.properties file.
at android.databinding.tool.util.L.printMessage(L.java:134)
at android.databinding.tool.util.L.e(L.java:107)
at android.databinding.tool.Context.discoverAndroidX(Context.kt:62)
Even if you enable the use of AndroidX
android.useAndroidX=true
android.enableJetifier=true
and databinding
android {
...
...
dataBinding {
enabled = true
}
}
you will still have problems related to dependencies.
I suggest to you, refactoring and changing automatically all the necessary imports to Android X to avoid this kind of problems.
Select your project, go yo Refactor
> Migrate to AndroidX
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