添加库通知处理程序时出错

时间:2016-09-16 03:40:11

标签: android azure push-notification

我在azurenotification

后添加了azure通知

但是当我添加

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

运行app它有错误

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.
这是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"
    }
}
我的清单 enter image description here 我该怎么办呢?非常感谢

1 个答案:

答案 0 :(得分:2)

移除...

android:icon="@mipmap/ic_launcher"

在清单上。看来微软在他们的图书馆中定义了一个与你的图标冲突的图标。这可能现在已经解决了......错误说明了这一点

  

错误:任务':app:processDebugManifest'的执行失败。   清单合并失败:来自AndroidManifest.xml的属性应用程序@ icon value =(@ mipmap / ic_launcher):18:9-43       也出现在[com.microsoft.azure:azure-notifications-handler:1.0.1] AndroidManifest.xml:13:9-45 value =(@ drawable / ic_launcher)。       建议:在AndroidManifest.xml:16:5-107:19中添加'tools:replace =“android:icon”'以覆盖。