๐Ÿค”<Android> java.lang.RuntimeException: Manifest merger failed with multiple errors, see logs ์˜ค๋ฅ˜

๐Ÿ“Œ ์˜ค๋ฅ˜๋‚ด์šฉ

๋„ค์ด๋ฒ„ ์ง€๋„ API ์‚ฌ์šฉํ•ด ์ง€๋„๋ฅผ ๋„์–ด ๋ณผ๋ ค๊ณ  ํ–ˆ๋Š”๋ฐ ๋‹ค์Œ๊ณผ ๊ฐ™์Œ ์˜ค๋ฅ˜๊ฐ€ ๋–ณ๋‹ค..
๋‚ด์šฉ์„ ์ฝ์–ด๋ณด๋ฉด Manifest์— ๋ฌธ์ œ๊ฐ€ ์ƒ๊ธด๊ฑฐ ๊ฐ™์Šต๋‹ˆ๋‹ค.

๐Ÿ“Œ ์—๋Ÿฌ ํ•ด๊ฒฐ

Manifest.xml

Manifest.xml์— ๋“ค์–ด๊ฐ€ ํ•˜๋‹จ์ชฝ Merged Manifest ํƒญ์— ๋“ค์–ด๊ฐ€ ์—๋Ÿฌ ๋‚ด์šฉ์„ ์ฝ์–ด๋ณด๋‹ˆ
'tools:replace="android:appComponentFactory" ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•˜๋ผ๊ณ  ํ•ด์„œ ์ถ”๊ฐ€๋ฅผ ํ•ด์คฌ์Šต๋‹ˆ๋‹ค.

๋‹ค์‹œ ๋นŒ๋“œ๋ฅผ ํ•ด๋ณด์•˜์ง€๋งŒ ์—๋Ÿฌ๋ฅผ ์ฐพ์ด ๋ชปํ–ˆ์Šต๋‹ˆ๋‹ค.

ํ•œ์ฐธ์„ ํ—ค๋ฉ”๋‹ค๊ฐ€ ํ•œ ๋ธ”๋กœ๊ทธ์—์„œ ๋‹ค์Œ ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•ด์ฃผ๋ฉด ํ•ด๊ฒฐ์ด ๋œ๋‹คํ•ด์„œ ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•ด ๋ณด์•˜์Šต๋‹ˆ๋‹ค. ์ฝ”๋“œ๋Š” tools:replace="android:appComponentFactory ๋ฐ‘์— ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.

tools:replace="android:appComponentFactory"
android:appComponentFactory="whateverString"

์ฐธ๊ณ  ๋ธ”๋กœ๊ทธ : https://dnight.tistory.com/entry/Attribute-applicationappComponentFactory-valueandroidsupportv4appCoreComponentFactory-from-comandroidsupportsupport-compat2800

๋˜ ๋‹ค๋ฅธ ๋ฌธ์ œ ๋ฐœ์ƒ..

๋‹ค์‹œ ๋นŒ๋“œ๋ฅผ ํ•ด๋ณด์•˜๋Š”๋ฐ ์ด๋ฒˆ์— gradle์—์„œ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•œ๊ฑฐ ๊ฐ™์Šต๋‹ˆ๋‹ค.

ํ•ด๊ฒฐ๋ฒ•

์ด๊ฑด ๋นจ๋ฆฌ ํ•ด๊ฒฐํ–ˆ์Šต๋‹ˆ๋‹ค.gradle.properties์— ๋“ค์–ด๊ฐ€ ์•„๋ž˜ ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•ด ์ฃผ์–ด ์˜ค๋ฅ˜๋ฅผ ์žก์•˜์Šต๋‹ˆ๋‹ค.

android.enableJetifier=true

์ฐธ๊ณ  ๋ธ”๋กœ๊ทธ : https://ryan94.tistory.com/36

์—๋Ÿฌ๋ฅผ ์žก๊ณ  ๋นŒ๋“œ๋ฅผ ๋‹ค์‹œ ํ•ด๋ดค๋Š”๋ฐ ์ •์ƒ์ ์œผ๋กœ ๋นŒ๋“œ๊ฐ€ ์™„๋ฃŒ๋˜์–ด ์ง€๋„๊ฐ€ ๋‚˜์™”์Šต๋‹ˆ๋‹ค.

์ข‹์€ ์›นํŽ˜์ด์ง€ ์ฆ๊ฒจ์ฐพ๊ธฐ