【问题标题】:Unable to use android:icon="@mipmap/ic_launcher" in Manifest after play services 7.5.0播放服务 7.5.0 后无法在 Manifest 中使用 android:icon="@mipmap/ic_launcher"
【发布时间】:2015-08-17 13:15:25
【问题描述】:

我最近使用依赖项更新播放服务
compile 'com.google.android.gms:play-services:7.5.0'
我的应用程序图标启动器位于 @mipmap/ic_launcher" 中,但这在 AndroidManifest.xml 中显示错误。 我应该再次将此图标放在drawable 中吗?
帮我找出解决办法。

更新:这是来自 Android 工作室的消息

Error:(17, 9) Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application@icon value=(@mipmap/ic_launcher) from AndroidManifest.xml:17:9
    is also present at com.pnikosis:materialish-progress:1.0:13:9 value=(@drawable/ic_launcher)
    Suggestion: add 'tools:replace="android:icon"' to <application> element at AndroidManifest.xml:14:5 to override
Error:(17, 9) Attribute application@icon value=(@mipmap/ic_launcher) from AndroidManifest.xml:17:9
D:\3cworkspace\PeakPerformance\app\src\main\AndroidManifest.xml

【问题讨论】:

标签: android google-play-services drawable mipmaps


【解决方案1】:

将以下行添加到应用程序标签

tools:replace="android:icon"

还将xmlns:tools="http://schemas.android.com/tools" 导入清单文件。

【讨论】:

  • 谢谢!这是ic_launcher应用图标冲突的解决方案。
  • 这绝对应该被标记为正确答案。像魅力一样工作!
【解决方案2】:

在清单中的应用程序标签下,为我工作。

androidtools:replace='android:icon'
android:name=".ApplicationSubClass"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.Holo.Light"
tools:replace="android:icon" > //HERE

【讨论】:

    猜你喜欢
    • 2023-04-07
    • 1970-01-01
    • 2015-10-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-17
    • 1970-01-01
    相关资源
    最近更新 更多