1

I added azure notification follow azurenotification

But when I added

compile 'com.microsoft.azure:notification-hubs-android-sdk:0.4@aar'
compile 'com.microsoft.azure:azure-notifications-handler:1.0.1@aar'

And run app it have error

Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application@icon value=(@mipmap/ic_launcher) from AndroidManifest.xml:18:9-43
 is also present at [com.microsoft.azure:azure-notifications-handler:1.0.1] AndroidManifest.xml:13:9-45 value=(@drawable/ic_launcher).
 Suggestion: add 'tools:replace="android:icon"' to <application> element at AndroidManifest.xml:16:5-107:19 to override.
here is build.gradle

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:24.0.0'
    compile files('libs/ads28112016.jar')
    compile 'com.google.android.gms:play-services-ads:9.4.0'
    compile 'com.google.android.gms:play-services-analytics:9.4.0'
    compile 'com.google.android.gms:play-services-gcm:9.4.0'
    compile 'com.microsoft.azure:notification-hubs-android-sdk:0.4@aar'
    compile 'com.microsoft.azure:azure-notifications-handler:1.0.1@aar'
}
repositories {
    maven {
        url "http://dl.bintray.com/microsoftazuremobile/SDK"
    }
}
My Manifest enter image description here How I can fix it? thank you very much
Hoa.Tran
  • 935
  • 10
  • 26

1 Answers1

2

Removing...

android:icon="@mipmap/ic_launcher"

On the manifest. It seems Microsoft defined an icon on their library conflicting with yours. This is probably fixed now... The error states that cleary

Error:Execution failed for task ':app:processDebugManifest'. Manifest merger failed : Attribute application@icon value=(@mipmap/ic_launcher) from AndroidManifest.xml:18:9-43 is also present at [com.microsoft.azure:azure-notifications-handler:1.0.1] AndroidManifest.xml:13:9-45 value=(@drawable/ic_launcher). Suggestion: add 'tools:replace="android:icon"' to element at AndroidManifest.xml:16:5-107:19 to override.

konzo
  • 1,973
  • 22
  • 32