AndroidStudio 3.4 3.5 以上版本關閉 AndroidX 使用

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
}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章