Unable to migrate Flutter project to AndroidX

前端 未结 8 653
自闭症患者
自闭症患者 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条回答
  •  死守一世寂寞
    2020-12-14 15:51

    Here is how I got rid of "compileSdkVersion 28" error. But before I solved it this way, I upgraded Android Studio IDE from 3.4.1 -> 3.5.1. I am not sure if this was really needed. So whatever version of IDE you have, see if you can use following steps to solve it.

    1. Go to "Project Structure" - (2nd icon on left of AVD Manager icon on top right corner of IDE)

    2. On "Project Structure" dialog under left navigation click on Project Settings->Modules

    3. After selecting Modules, on the right pane you should see 3 tabs Sources, Paths, Dependencies

    4. Click on Dependencies, if you are getting compileSdkVersion 28 error the SDK version under Dependencies is pointing to version lower than 28 -> Select 28 or higher

    5. Click OK

    1. Now Refactor->Migrate to AndroidX worked for me

提交回复
热议问题