Flutter打包安卓提示请使用 -Xlint:deprecation 重新编译、请使用 -Xlint:unchecked 重新编译

在这里插入图片描述
引用过时的API出现这样的提示,可以在Flutter andoird 目录下的 build.gradle中添加配置如下:

    gradle.projectsEvaluated {
    
    
        tasks.withType(JavaCompile) {
    
    
            options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
        }
    }

在这里插入图片描述

然后再次运行或者打包就会有相应的具体提示
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/zl18603543572/article/details/123260721