Android Studio操作步骤:
Refactor > Migrate to AndroidX
官网链接:https://developer.android.google.cn/jetpack/androidx/migrate?hl=zh-cn
对于老项目,直接迁移显然不可能一步到位。可以通过命令查看哪些依赖还是用的support包,然后手动修改。
查看项目依赖树命令:
gradlew -q Dengta:dependencies
implementation ('com.github.lihangleo2:ShadowLayout:3.2.4'){
exclude group: 'com.android.support'
}
api('net.polyv.android:polyvPlayer:2.15.2') {
// exclude(module:'alicloud-android-utdid')
exclude(module: 'alicloud-android-httpdns')
exclude(module: 'gson')
exclude group: 'com.android.support'
}
./jetifier-standalone -i <source-library> -o <output-library>