1,导入项目后首先提示当前要求版本是(如,2.0.0),当前版本是(6.5.0)
2,修改project/build.gradle,改为:
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'
}
3,maven库地址更新:
4,新建项目,将gradle文件夹复制到旧项目中
5,修改app/build.gradle,
6,然后dependencies报错:
鼠标放上提示:Version 28 (intended for Android Pie and below) is the last version of the legacy support library, so we recommend that you migrate to AndroidX libraries when using Android Q and moving forward. The IDE can help with this: Refactor > Migrate to AndroidX...
28(Pie)是支持这个库的最后一个版本,
那我们就把项目sdk改为28,此时sync gradle项目后targetsdkVersion会显示红色错误
然后直接build apk
关闭热点