1. 根目錄下修改 gradle.properties
文件
#是否使用AndroidX庫
android.useAndroidX=false
#是否遷移第三方庫
android.enableJetifier=false
2. 第一步無效時,請降低 gradle 版本
修改根目錄下的 build.gradle
文件,使用 3.1.4 或以下版本。
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}