Android Q(currently in Beta) will only support AndroidX support libraries. Additionally React Native 0.60 will include default AndroidX support. As such, it would be helpful to have a new version with AndroidX support soon after RN 60 is released. We may want to do this as a major version bump in case we want to keep supporting the current version with minor fixes.
Edit: Google Play Services latest version uses AndroidX as well
Why it is needed
Once AndroidX support lands in RN 60, there will be a need for all RN packages to add AndroidX support as you can only have one or the other and Jetifier doesn't work with 3rd party dependencies.
Possible implementation
Use Jetifier to migrate support lib to androidx if we're already on support lib version 28.0.0
Code sample
Migration Guide
该提问来源于开源项目:react-native-device-info/react-native-device-info
It does look that way.
1cd android && ./gradlew :app:dependenciesmight show why it was still linking against the support libraries. My guess is the library name or version or similar?
In fact I think these library names: https://github.com/react-native-community/react-native-device-info/blob/master/android/build.gradle#L44 may need the treatment of replacing the entire library name as I mentioned myself in the jetifier docs.
If someone is willing to try a patch to the build.gradle here that implements that, it would likely fix it and be useful for others as a PR and/or as a patch to use via patch-package until we can do a release
【转自:响水网站制作公司 http://www.1234xp.com/xiangshui.html 复制请保留原URL】