[Android/Kotlin] Caused by: java.lang.RuntimeException: Manifest merger failed with multiple errors, see logs 에러 해결 방법

SoyoungLee·2022년 7월 19일
0
post-thumbnail

💌 [안드로이드/에러] Caused by: java.lang.RuntimeException: Manifest merger failed with multiple errors, see logs 에러 해결 방법

네이버 Map API 사용해서 띄우려 빌드하는데 다음과 같은 오류가 났다

  • What went wrong:
    Execution failed for task ':app:processDebugMainManifest'.
    Manifest merger failed with multiple errors, see logs

AndroidManifest.xml > 하단 Merded Manifest > Error 확인

Error: Attribute application@appComponentFactory value=(androidx.core.app.CoreComponentFactory) from AndroidManifest.xml:24:18-86 is also present at AndroidManifest.xml:22:18-91 value=(android.support.v4.app.CoreComponentFactory). Suggestion: add 'tools:replace="android:appComponentFactory"' to element at AndroidManifest.xml:18:5-85:19 to override.

📌 해결 방법

AndroidManifest.xml 에 추가

<application
	tools:replace="android:appComponentFactory"
	android:appComponentFactory="whateverString"
    
    ... >

빌드 후 또 다른 에러 생겼다

Error: tools:replace specified at line:17 for attribute android:appComponentFactory, but no new value specified Study.app main manifest (this file), line 16
Error: Validation failed, exiting Study.app main manifest (this file)

📌 해결 방법

gradle.properties 에 추가

android.useAndroidX=true
android.enableJetifier=true

해결 완료 !

참고 : https://hjlab.tistory.com/400
https://stackoverflow.com/questions/55217992/manifest-merger-failed-attribute-applicationappcomponentfactory-androidx

profile
Android Developer..+ iOS 슬쩍 🌱 ✏️끄적끄적,,개인 기록용 👩🏻‍💻

0개의 댓글