coomar2841 / image-chooser-library

An Easy Image/Video Chooser Library for your Android Apps
646 stars 193 forks source link

Build fails with Manifest Merger Error in Android Studio #63

Closed mradlmaier closed 9 years ago

mradlmaier commented 9 years ago

Android Studio with Gradle build fails:

Error:(11, 9) Execution failed for task ':app:processDebugManifest'.

Manifest merger failed : Attribute application@icon value=(@mipmap/ic_launcher) from AndroidManifest.xml:11:9 is also present at com.kbeanie:image-chooser-library:1.3.52:13:9 value=(@drawable/ic_launcher) Suggestion: add 'tools:replace="android:icon"' to element at AndroidManifest.xml:8:5 to override

I am using: compile 'com.kbeanie:image-chooser-library:1.4.3@aar'

mradlmaier commented 9 years ago

The solution:

  1. Add tools namespace in manifest tag: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="android.kingbarf.com.kingbarf" xmlns:tools="http://schemas.android.com/tools" >.....
  2. Add tools:replace="android:icon" in application tag <application tools:replace="android:icon" .... >.....