네이버 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