Manifest merger failed Attribute application icon

I have created code in android without problem. But, when I added new external library, I get error message like this :

Error:Execution failed for task ':mie:processDebugManifest'.
> Manifest merger failed : Attribute application@icon value=(@mipmap/ic_launcher) from AndroidManifest.xml:7:9-43
	is also present at [com.pnikosis:materialish-progress:1.0] AndroidManifest.xml:13:9-45 value=(@drawable/ic_launcher).
	Suggestion: add 'tools:replace="android:icon"' to <application> element at AndroidManifest.xml:5:5-47:19 to override.

This error related with my external library have icon setting and conflict with my icon program. We can solve this problem with editing AndroidManifest.xml file. My original contents of this file like this :

<?xml version="1.0" encoding="utf-8"?>
<manifest package="smartfamily.mie"
          xmlns:android="http://schemas.android.com/apk/res/android">

    <application
        android:allowBackup="true"
        ...
        ...
        android:theme="@style/AppTheme">
        ...

after modified :

<?xml version="1.0" encoding="utf-8"?>
<manifest package="smartfamily.mie"
          xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:tools="http://schemas.android.com/tools">

    <application
        android:allowBackup="true"
        ...
        ...
        android:theme="@style/AppTheme"
        tools:replace="android:icon,android:theme">
        ...

This method solve my problem related with Manifest merger failed Attribute application icon.

Add a Comment

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.