AndroidX迁移-androidx.legacy:legacy-support-v4或androidx.appcompat:appcompat

问题描述 投票:0回答:1

我尝试通过使用Android Studio /重构/迁移到AndroidX将旧项目之一迁移到AndroidX ...

但是,对于某些库项目,当我浏览它们的build.gradle时,我注意到Android Studio改变了这一行的位置

implementation 'com.android.support:support-v4:28.0.0'

to

implementation 'androidx.legacy:legacy-support-v4:1.0.0'

我原以为迁移的行应该是

implementation 'androidx.appcompat:appcompat:1.0.0'

我可以知道为什么会这样吗?我已经尝试了androidx.legacy:legacy-support-v4:1.0.0androidx.appcompat:appcompat:1.0.0。他们两个都编译并执行良好。

但是,哪个是正确的?库正在使用androidx.viewpager.widget.ViewPager

android androidx
1个回答
0
投票

[C0类]

© www.soinside.com 2019 - 2024. All rights reserved.