Flutter - Execution failed for task ':app:lintVitalRelease'
build.gradle을 최신버전으로 올리고 release모드를 할 때 에러가 발생하는경우가 있습니다
필자가 마주친 에러는
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':app:profileRuntimeClasspath'.
> Failed to transform libs.jar to match attributes {artifactType=processed-jar, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
> Execution failed for JetifyTransform: ~\build\app\intermediates\flutter\profile\libs.jar.
> Transform's input file does not exist: ~\build\app\intermediates\flutter\profile\libs.jar
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan
to get full insights.
(상황에 따라서는 \profile\ 부분이 debug로 나올 수도 있습니다)
app:lintVitalRelease 작업을 실패했습니다
app:profileRuntimeClasspath 구성을 위한 아티팩트들을 해결할 수 없습니다 정도로 축약해볼 수 있겠는데요
해결방법을 찾아보니 릴리즈 모드 체크하는 기능을 해제 시키는 방법과
lintOptions {
checkReleaseBuilds false
}
release모드 사용하기전에 에러 부분이 debug면 debug모드실행을
profile이면 profile모드를 실행한 후 release를 하는 방법이 있습니다
혹시 문제가 생길 수 있으니 2번 방법을 사용하는게 좋을거 같습니다