📱Android/📱 Android (Kotlin)
[Android] 'tools:replace="android:label"', 'tools:replace="android:theme"' 해결방법
MinChan-Youn
2022. 8. 23. 19:00
안녕하세요~ 챠니입니다! :)
이번에는 'tools:replace="android:label"', 'tools:replace="android:theme"' 오류가 나왔을때 해결하는 방법에 대해서 알아보겠습니다~!
문제확인
문제는 다음과 같았습니다.
Manifest merger failed : Attribute application@label value=(**********) from AndroidManifest.xml:39:9-34 is also present at [**********] AndroidManifest.xml:46:9-41 value=(@string/app_name). Suggestion: add 'tools:replace="android:label"' to <application> element at AndroidManifest.xml:36:5-142:19 to override. |
Manifest merger failed : Attribute application@theme value=(**********) from AndroidManifest.xml:42:9-53 is also present at [**********] AndroidManifest.xml:50:9-59 value=(@style/Theme.AppCompat.NoActionBar). Suggestion: add 'tools:replace="android:theme"' to <application> element at AndroidManifest.xml:36:5-142:19 to override. |
다음처럼 'tools:replace="android:label"', 'tools:replace="android:theme"'를 추가하라는 문구가 나옵니다.
해결방법
해결방법은 다음과 같습니다.
AndroidManifest.xml파일에
tools:replace="android:theme, android:label"
를 추가합니다.
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="${app_id}"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/***********"
tools:replace="android:theme, android:label">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
정상적으로 Build가 되는것을 볼 수 있습니다.
질문 또는 궁굼한 부분은 댓글을 남겨주세요! 친절하게 답변드리겠습니다!
응원의 댓글은 저에게 큰 힘이 된답니다! :)
즐거운 하루되세요!
깃허브 보러 놀러오세요 👇 (맞팔환영)
https://github.com/younminchan
younminchan - Overview
안드로이드 2년차 개발자 •⚽️/🎤/🥁/🖥/🏃♂️/🚴♂️/🤟 TechBlog⬇️ minchanyoun.tistory.com - younminchan
github.com
반응형