Flutter Projects & Android X Migration Issues

后端 未结 9 1265
粉色の甜心
粉色の甜心 2020-11-27 14:51

I just created a new flutter project, added a few plugins and I\'m getting the plugin switched to android x therefore i need to switch to android x. I\'ve tried all the diff

9条回答
  •  没有蜡笔的小新
    2020-11-27 15:46

    I faced the similar problem.

    This Medium article helped me to find 75% solution for my problem

    I followed the steps mentioned in this article. and I'm stuck in the end

    Android studio is not allowed me to open android module (folder) from the project structure directly. So I opend manually in the new window of android studio.

    Android is not refactored the gradle testRunner classpath androidTestImplementation it is prompting like is dependent So then I manually replaced all the paths like.

    • replaced android.support.test.runner.AndroidJUnitRunner to androidx.test.runner.AndroidJUnitRunner
    • replaced com.android.support.test:runner to androidx.test:runner:1.1.0
    • replaced com.android.support.test.espresso:espresso-core to androidx.test.espresso:espresso-core:3.1.0

    and at the end I added to android/gradle.properties

    android.useAndroidX=true
    android.enableJetifier=true
    

    Then ran the application. ;) after that androidX warning disappeared.

提交回复
热议问题