写点什么

您有一份 AndroidX 升级指南未领取 (1),2021 年不想被公司优化

用户头像
Android架构
关注
发布于: 刚刚

androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'}


被修改成了:


dependencies {implementation fileTree(dir: 'libs', include: ['*.jar'])implementation 'androidx.appcompat:appcompat:1.0.2'implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2'testImplementation 'junit:junit:4.12'androidTestImplementation 'androidx.test:runner:1.1.0'androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'}


可以看到 com.android.support 全部被修改成了 androidx,版本号也改变了,同时项目中此依赖的引用包名也会被同时修改。


gradle.properties


增加了以下两个配置:


  • android.useAndroidX=true


设置 true 为时,Android 插件会使用相应的 AndroidX 库而不是支持库,默认为 false。


  • android.enableJetifier=true


设置 true 为时,Android 插件会自动迁移现有的第三方库,通过重写其二进制文件来使用 AndroidX,默认为 false。

4.支持库迁移 AndroidX 速查表


《Android学习笔记总结+最新移动架构视频+大厂安卓面试真题+项目实战源码讲义》
浏览器打开:qq.cn.hn/FTe 免费领取
复制代码


:media2-exoplayer:1.0.0-alpha01 || com.android.support:mediarouter-v7 | androidx.mediarouter:mediarouter:1.0.0 || com.android.support:multidex | androidx.multidex:multidex:2.0.0 || com.android.support:multidex-instrumentation | androidx.multidex:multidex-instrumentation:2.0.0 || com.android.support:palette-v7 | androidx.palette:palette:1.0.0 || com.android.support:percent | androidx.percentlayout:percentlayout:1.0.0 || com.android.support:preference-leanback-v17 | androidx.leanback:leanback-preference:1.0.0 || com.android.support:preference-v14 | androidx.legacy:legacy-preference-v14:1.0.0 || com.android.support:preference-v7 | androidx.preference:preference:1.0.0 || com.android.support:print | androidx.print:print:1.0.0 || com.android.support:recommendation | androidx.recommendation:recommendation:1.0.0 || com.android.support:recyclerview-selection | androidx.recyclerview:recyclerview-selection:1.0.0 || com.android.support:recyclerview-v7 | androidx.recyclerview:recyclerview:1.0.0 || com.android.support:slices-builders | androidx.slice:slice-builders:1.0.0 || com.android.support:slices-core | androidx.slice:slice-core:1.0.0 || com.android.support:slices-view | androidx.slice:slice-view:1.0.0 || com.android.support:slidingpanelayout | androidx.slidingpanelayout:slidingpanelayout:1.0.0 || com.android.support:support-annotations | androidx.annotation:annotation:1.0.0 || com.android.support:support-compat | androidx.core:core:1.0.0 || com.android.support:support-content | androidx.contentpager:contentpager:1.0.0 || com.android.support:support-core-ui | androidx.legacy:legacy-support-core-ui:1.0.0 || com.android.support:support-core-utils | androidx.legacy:legacy-support-core-utils:1.0.0 || com.android.support:support-dynamic-animation | androidx.dynamicanimation:dynamicanimation:1.0.0 || com.android.support:support-emoji | androidx.emoji:emoji:1.0.0 || com.android.support:support-emoji-appcompat | androidx.emoji:emoji-appcompat:1.0.0 || com.android.support:support-emoji-bundled | androidx.emoji:emoji-bundled:1.0.0 || com.android.support:support-fragment | androidx.fragment:fragment:1.0.0 || com.android.support:support-media-compat | androidx.media:media:1.0.0 || com.android.support:support-tv-provider | androidx.tvprovider:tvprovider:1.0.0 || com.android.support:support-v13 | androidx.legacy:legacy-support-v13:1.0.0 || com.android.support:support-v4 | androidx.legacy:legacy-support-v4:1.0.0 || com.android.support:support-vector-drawable | androidx.vectordrawable:vectordrawable:1.0.0 || com.android.support:swiperefreshlayout | androidx.swiperefreshlayout:swiperefreshlayout:1.0.0 || com.android.support:textclassifier | androidx.textclassifier:textclassifier:1.0.0 |

用户头像

Android架构

关注

还未添加个人签名 2021.10.31 加入

还未添加个人简介

评论

发布
暂无评论
您有一份AndroidX升级指南未领取(1),2021年不想被公司优化