在调试时,出现如下提示:

    1. [!] Your app isn't using AndroidX.
    2. To avoid potential build failures, you can quickly migrate your app by following the steps on https://goo.gl/CP92wY.

    根据提示应该可以看出,当前咱们的的项目没有使用AndroidX, 这个AndroidX是Android系统的极大的提升,所以说也是比较重要的。

    1. AndroidX is a major improvement to the original Android Support Library.
    2. It provides the androidx.* package libraries, unbundled from the platform API. This means that it offers backward compatibility and is updated more frequently than the Android platform.

    在Flutter官网的说明中也专门提到了AndroidX Migration的迁移问题,通过问答的方式给出了一些对应的解决方案。
    对于此项目构建Apk提示问题,只需要添加两行代码即可解决
    在..\android\gradle.properties中添加如下代码即可:

    1. android.enableJetifier=true
    2. android.useAndroidX=true