안드로이드
Lint found fatal errors while assembling a release target. 에러 해결
bacass
2021. 3. 4. 21:10
앱을 테스트할때는 빌드가 잘 되는데
릴리즈용 apk 파일을 빌드할때는 못보던 에러가 발생하며 사이닝된 릴리즈용 파일을 만들지 못했다.
Lint found fatal errors while assembling a release target.
검색해보니 처리할 수 있는 방법이 두가지 있다.
#1. 리포트 파일을 읽어서 해결한다.
app/build/reports/ 경로에 html 과 xml 파일이 생성된다.
이것을 참고해 에러의 원인을 해결한다.
#2. module 의 build.gradle 파일에 아래의 옵션을 추가한다.
android {
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
}
만약 원인을 해결 못했다면 애초에 이 옵션을 이용해 더이상 에러가 나지 않도록 막는 방법을 쓴다.