tools:replace="android:icon 不起作用

Ami*_*oui 0 android android-manifest android-gradle-plugin

我用 :

  1. 安卓工作室 2.2.2

  2. 编译 SDK 版本:API 23

  3. 构建工具版本 23.0.2

我正在尝试将SweetAlert for Android库用于我的 android 应用程序中的对话框

所以在我添加 compile 'cn.pedant.sweetalert:library:1.3'到我的依赖项之后,我收到了这个错误

来自 AndroidManifest.xml:19:9-40 的属性 application@icon value=(@mipmap/launcher) 也存在于 [com.pnikosis:materialish-progress:1.0] AndroidManifest.xml:13:9-45 value=(@可绘制/ic_launcher)。建议:将 'tools:replace="android:icon"' 添加到 AndroidManifest.xml:16:5-56:19 的元素以覆盖。

AndroidManifest.xml :

<application
    android:name=".utils.MyApp"
    android:allowBackup="true"
    android:icon="@mipmap/launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme.Red"
    tools:replace="android:icon">
Run Code Online (Sandbox Code Playgroud)

Gre*_*der 5

xmlns:tools="http://schemas.android.com/tools"在您的AndroidManifest.xml文件中添加清单标签。注意schemas之前的http://

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.your.app">
Run Code Online (Sandbox Code Playgroud)