Android Studio Gradle 아이콘 오류, 매니페스트 합병
이 메시지를 계속보고 있으며이를 해결하는 방법을 잘 모릅니다.
Error:(43, 9) Attribute application@icon value=(@drawable/new_app_icon) from AndroidManifest.xml:43:9
is also present at com.github.erizet.signala:signala-longpolling:0.20:7:18 value=(@drawable/ic_launcher)
Suggestion: add 'tools:replace="android:icon"' to <application> element at AndroidManifest.xml:40:5 to override
:OpenBook:processDebugManifest FAILED
Error:Execution failed for task ':OpenBook:processDebugManifest'.
> Manifest merger failed with multiple errors, see logs
android:replace="android:icon"
내 아이콘으로도 매니페스트에 추가 를 시도했습니다 .
android:icon="@drawable/ic_launcher
라이브러리에서 삭제를 시도했지만 maven에서 가져 오기 때문에 빌드 할 때 계속 돌아옵니다.
어떤 아이디어?
gradle에 대한 mainfest Merger 도구의 결함 인 것 같습니다.
http://tools.android.com/tech-docs/new-build-system/user-guide/manifest-merger
내 매니페스트 태그에 추가하여 해결 xmlns:tools="http://schemas.android.com/tools"
그런 다음 tools:replace="android:icon,android:theme"
응용 프로그램 태그에 추가
합병이 다른 라이브러리가 아닌 매니페스트 아이콘과 테마를 사용하도록 지시합니다.
그것이 도움이되기를 바랍니다.
나는 추가하여이 같은 문제를 해결할, 같은 문제가 xmlns:tools="http://schemas.android.com/tools"
mainfest 파일의 맨 위에, 및 추가 tools:replace="android:icon"
와 같은 모습으로
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" // add tools line here
package="yourpackage">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:replace="android:icon"> ///add this line
.....
</application>
</manifest>
나는 같은 오류가 있습니다.이 코드는 내 문제를 해결합니다. 당신과 공유하고 싶습니다.
에서 Manifest.xml
:
이 코드를 xml 파일 위에 추가하십시오.
xmlns:tools="http://schemas.android.com/tools"
그런 다음 추가했습니다 :
tools:replace="android:icon,android:theme,android:label,android:name"
응용 프로그램 태그에
shimi_tap의 대답으로 충분합니다. 기억해야 할 것은 필요한 것만 선택한다는 것입니다. {아이콘, 이름, 테마, 라벨} 중에서 선택하십시오. 추가했는데 tools:replace="android:icon,android:theme"
작동하지 않습니다. 추가했는데 tools:replace="android:icon,android:theme,android:label,android:name"
작동하지 않습니다. 내가 추가했을 때 작동합니다 tools:replace="android:icon,android:theme,android:label"
. 따라서 매니페스트 파일에서 충돌이 정확히 무엇인지 확인하십시오.
그냥 추가 xmlns:tools="http://schemas.android.com/tools"
매니페스트 태그에, 그리고 당신은 추가해야합니다 tools:replace="android:icon"
전에 android:icon="@mipmap/ic_launcher"
.
이 오류는 앱의 minSdk가 라이브러리의 minSdk보다 높은 경우에도 발생합니다.
app's minSdk >= libraries minSdk
많은 시간을 보낸 후 솔루션을 얻었습니다.
ic_launcher를 가져 와서 drawables 폴더에 붙여 넣으십시오.
Go to your manifest and change android:icon="@drawable/ic_launcher"
Clean your project and rebuild
Hope it helps you
I had this problem changing the icon from drawable to mipmap.
I only missed the line
tools:replace="android:icon"
in the manifest.
For some reason android studio doesn't like calling app icon from drawable folder. So in that case I created mipmap resource directory under res folder.
Right click res folder > new > android resource directory > resource type: mipmap and now drop any icon in there then reference that into manifest file. Sharing this since this method worked for me.
android:icon:@drawable/ic_launcher"
to
android:icon="@mipmap/ic_launcher"
If nothing of that work, close Android Studio. Go on app/src/main, open the file AndroidManifest.xml in a text editor (like sublime), remove/replace the erros lines, save and reopen android studio.
When an attribute value contains a placeholder (see format below), the manifest merger will swap this placeholder value with an injected value. Injected values are specified in the build.gradle. The syntax for placeholder values is ${name} since @ is reserved for links. After the last file merging occurred, and before the resulting merged android manifest file is written out, all values with a placeholder will be swapped with injected values. A build breakage will be generated if a variable name is unknown.
from http://tools.android.com/tech-docs/new-build-system/user-guide/manifest-merger#TOC-Build-error
Shimi_tap's answer is the right way to fix the problem. If you want to use old merger tool you can add this to build.gradle file
android { useOldManifestMerger true }
For me, this issue occurred after updating Google Play Services. One of the libraries I was using incorporated this library using the "+" in its gradel reference, like
compile 'com.google.android.gms:play-services:+'
This created an issue because the min version targeted by that library was less than what was targeted by the current version of Google Play Services. I found this by simply looking in the logs.
In your .gradle
change MinSDK, for example:
build.gradle
(Module: app)- before:
minSdkVersion 9
- after:
minSdkVersion 14
- before:
etc.
I tried all the solution mentioned above
in Manifest.xml
:
add this code in top of your xml file within manifest tag:
xmlns:tools="http://schemas.android.com/tools"
Then added :
tools:replace="android:icon,android:theme,android:label,android:name"
to the application tag
but none of it worked. I needed to delete a xml file which was situated in
mipmap-anydpi-v26/ic_launcher_round.xml
I was testing the application in
Samsung Galaxy 8 with OS version 8.0.0
is it really a solution?
Within the AndroidManifest.xml file, add the following to the application
node:
tools:replace="android:appComponentFactory,android:icon,android:theme,android:label,android:name"
참고URL : https://stackoverflow.com/questions/24506800/android-studio-gradle-icon-error-manifest-merger
'IT story' 카테고리의 다른 글
mongodb에서 .bson 파일 형식을 가져 오는 방법 (0) | 2020.06.21 |
---|---|
입력 필드에 필요한 jQuery 추가 (0) | 2020.06.21 |
Linux 명령 출력에서 첫 번째 줄 생략 (0) | 2020.06.21 |
UITableView 헤더 섹션 사용자 정의 (0) | 2020.06.21 |
이미지를 Base64 문자열로 변환하는 방법은 무엇입니까? (0) | 2020.06.21 |