Android X Backwards Compatibility
Solution 1:
This is not possible. To use any library that depends on AndroidX, your project must migrate your whole project to AndroidX.
Note that the reverse is supported - you can use libraries built with Support Library in projects that use AndroidX (that's the purpose of the android.enableJetifier=true
flag).
Solution 2:
- Consumer
support
-> ProducerandroidX
- not compatible.
You should migrate your consumer to use AndroidX. Android Studio menu -> Refactor -> Migrate to AndroidX...
- Consumer
androidX
-> Producersupport
- compatible.
Consumer's gradle.properties
in addition to use androidX
should enable Jetifier
which converts support
to androidX
android.useAndroidX=trueandroid.enableJetifier=true
Solution 3:
There is a way
Jetifier tool migrates support-library-dependent libraries to rely on the equivalent AndroidX packages instead. But when you put -r flag, it makes him to the exactly reverse process.
If you pass the -r flag, the utility runs in reverse mode. In this mode, the utility converts AndroidX APIs to the support library equivalents, instead of the other way around. Reverse mode is useful, for example, if you are developing libraries that use AndroidX APIs, but also need to distribute versions that use the support library.
Anyway, I will suggest to use it only in a very critical needs.
Post a Comment for "Android X Backwards Compatibility"