본문 바로가기
안드로이드

[Android] Manifest merger failed with multiple errors 해결

by 코딩히어로 2022. 10. 6.
728x90

title


안드로이드 스튜디오에서 기존 프로젝트 소스를 몇 가지 수정을 했고

마지막으로 APK 파일을 추출하려고 하니 다음과 같은 에러 문구가 발생했습니다

Manifest merger failed with multiple errors, see logs

해당 에러 문구만 봐서는 어디 쪽에서 문제가 생겼다는지 정확히 알 수 없는 게

Manifest 쪽을 살펴봐도 에러를 표시하지 않고 있다는 것인데 이번 포스팅에서는

해당 에러 문구 발생 시 상세 에러 로그를 찾는 방법에 대해 간단하게 소개합니다.

 

먼저 해당 에러를 만나게 되면 프로젝트의 Manifests로 이동합니다

그다음 Manifests가 나열되어 있는 소스코드 맨 하단 왼쪽을 보면 Merged Manifest라는 탭이 있습니다

해당 탭으로 진입을 합니다

1

맨 처음 에러 문구인 Manifest merger라는 에러가 무엇인가가 해당 탭을 진입하면서 오른쪽에 표시가 됩니다.

제 경우는 다음과 같은 에러 문구가 상세하게 나와있었습니다

Merging Errors: Warning uses-sdk:minSdkVersion value (13) specified in the manifest file is ignored. It is overridden by the value declared in the DSL or the variant API, or 1 if not declared/present. Current value is (16). TN_147_Java_D2xx_for_Android_Demo_Source.app main manifest (this file), line 6 Warning uses-sdk:targetSdkVersion value (16) specified in the manifest file is ignored. It is overridden by the value declared in the DSL or the variant API, or 1 if not declared/present. Current value is (32). TN_147_Java_D2xx_for_Android_Demo_Source.app main manifest (this file), line 6 Error: android:exported needs to be explicitly specified for element <activity#com.ftdi.heungnong.MainActivity>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details. TN_147_Java_D2xx_for_Android_Demo_Source.app main manifest (this file), line 20

간단하게 말해서 SDK 버전이 기존 30으로 되어있던 것을 32로 변경했는데

이 부분에서 문제가 발생했던 것이었습니다.

즉 SDK를 30으로 다시 내려준 뒤에 컴파일을 하니 에러 없이 잘 실행되는 것을 확인했습니다

 

Manifest merger 에러를 만나게 되면 위 방식대로 어떠한 에러가 발생했는지

상세 에러 로그를 확인하신 뒤에 문제를 해결하시면 됩니다

728x90
반응형

댓글