Flutter

Flutter 安卓运行时警告⚠️

2022-03-03  本文已影响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'
}
上一篇 下一篇

猜你喜欢

热点阅读