美文网首页
从Android-supportv4/v7迁移到supportx

从Android-supportv4/v7迁移到supportx

作者: 晖仔Milo | 来源:发表于2020-01-04 17:01 被阅读0次

迁移前期准备请移步:
https://www.jianshu.com/p/41de8689615d

项目中具体需要替换的配置如下:

配置文件方面

implementation "androidx.appcompat:appcompat:$androidxAppcompat"
implementation "androidx.recyclerview:recyclerview:$androidxRecyclerview"
implementation "androidx.constraintlayout:constraintlayout:$androidxConstraintlayout"

//实际代表的是
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

//使用到buttferKnife的项目还需替换
implementation "com.jakewharton:butterknife:$androidxButterknife"
annotationProcessor "com.jakewharton:butterknife-compiler:$androidxButterknifeCompiler"

//实际代表的是
implementation 'com.jakewharton:butterknife:10.2.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.1'

混淆文件增加

-keep class com.google.android.material.** {*;}
-keep class androidx.** {*;}
-keep public class * extends androidx.**
-keep interface androidx.** {*;}
-dontwarn com.google.android.material.**
-dontnote com.google.android.material.**
-dontwarn androidx.**

主要搜索如下

android.support

androidx.core

androidx.appcompat

一般需要替换的都和以上关键词有关

相关文章

网友评论

      本文标题:从Android-supportv4/v7迁移到supportx

      本文链接:https://www.haomeiwen.com/subject/lsvxactx.html