在使用flutter开发的过程中,需要根据不同的环境,不同的包名来打包
根据根据多渠道的打包配置,使用命令 flutter build apk --flavor dev 打包。报错如下
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:lintVitalDevRelease'.
> Could not resolve all artifacts for configuration ':app:productionReleaseRuntimeClasspath'.
> Failed to transform libs.jar to match attributes {artifactType=processed-jar, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
> Execution failed for JetifyTransform: /Users/xushun/project/flutter_xmps_provider/flutter_xmps/build/app/intermediates/flutter/productionRelease/libs.jar.
> Transform's input file does not exist: /Users/xushun/project/flutter_xmps_provider/flutter_xmps/build/app/intermediates/flutter/productionRelease/libs.jar. (See https://issuetracker.google.com/issues/158753935)
解决办法 在build.gradle中增加如下配置
lintOptions {
checkReleaseBuilds false
}