Unable to migrate Flutter project to AndroidX

前端 未结 8 660
自闭症患者
自闭症患者 2020-12-14 15:24

I have a Flutter project in Android Studio. I am planning to migrate to AndroidX. Whenever I do Refactor -> Migrate to AndroidX, Android St

8条回答
  •  猫巷女王i
    2020-12-14 16:10

    In gradle.build (app) add this

     compileSdkVersion 28
        defaultConfig {
            ......
            minSdkVersion 21
            targetSdkVersion 28
            ......
        }
    

    And there are some implementations required to use androidx :-

    implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    

    And add these given two lines(below) to gradle.properties:-

    android.useAndroidX=true
    android.enableJetifier=true
    

提交回复
热议问题