Android studio Gradle icon error, Manifest Merger
Solution 1:
It seems to be the fault of the mainfest Merger tool for gradle.
http://tools.android.com/tech-docs/new-build-system/user-guide/manifest-merger
Solved it by adding to my manifest tag xmlns:tools="http://schemas.android.com/tools"
Then added tools:replace="android:icon,android:theme"
to the application tag
This tells the merger to use my manifest icon and theme and not of other libraries
Hope it helps thanks
Solution 2:
I have same issue , I fix it like this by adding xmlns:tools="http://schemas.android.com/tools"
to the top of mainfest file , and add tools:replace="android:icon"
to be look like
<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>
Solution 3:
i have same error , just this code solve my problem , i want to share with you :
in Manifest.xml
:
-
add this code in top of your xml file :
xmlns:tools="http://schemas.android.com/tools"
-
Then added :
tools:replace="android:icon,android:theme,android:label,android:name"
to the application tag
Solution 4:
The answer of shimi_tap is enough.
What to be remembered is that choosing only what you need. Choose from {icon, name, theme, label}.
I added tools:replace="android:icon,android:theme"
, it does not work. I added tools:replace="android:icon,android:theme,android:label,android:name"
, it does not work. It works when I added tools:replace="android:icon,android:theme,android:label"
. So find out what the conflict exactly is in your manifest files.
Solution 5:
Just add xmlns:tools="http://schemas.android.com/tools"
to your manifest tag, and then you need to add tools:replace="android:icon"
before android:icon="@mipmap/ic_launcher"
.