flutter 升级后报一大堆错误 主要是在打包Android的时候会报错,iOS比较熟,问题都能解决,执行flutter build apk
Android的报错如下
* What went wrong:
Running Gradle task 'assembleRelease'... Execution failed for task ':app:lintVitalRelease'.
Running Gradle task 'assembleRelease'... > Could not resolve all artifacts for configuration ':app:debugRuntimeClasspath'.
Running Gradle task 'assembleRelease'... > Could not resolve io.flutter:arm64_v8a_debug:1.0.0-a67792536ca236a971d0efbcfd7af4efb8f6c119.
Running Gradle task 'assembleRelease'...
从报错信息可以看出 错误地方在于Execution failed for task ‘:app:lintVitalRelease‘
解决方法:
在android->app->build.gradle中android路径下添加如下代码
lintOptions {
disable 'InvalidPackage'
checkReleaseBuilds false
abortOnError false
}
重新执行 flutter build apk
即可正常打包