美文网首页Flutter
Flutter 安卓运行时警告⚠️

Flutter 安卓运行时警告⚠️

作者: 克伟看世界 | 来源:发表于2022-03-03 09:36 被阅读0次

    Flutter 安卓运行时警告⚠️

    Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
    Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    

    解决方法:

    升级gradle,具体如下:

    修改android/gradle/wrapper/gradle-wrapper.properties

    distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
    

    将其修改为

    distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
    

    即可解决。

    PS:有朋友说修改android/build.gradle:也一并贴出来方便参考

    dependencies {
        classpath 'com.android.tools.build:gradle:7.0.4'
    }
    

    相关文章

      网友评论

        本文标题:Flutter 安卓运行时警告⚠️

        本文链接:https://www.haomeiwen.com/subject/kvuyrrtx.html