Unable to use android:icon=“@mipmap/ic_launcher” in Manifest after play services 7.5.0

半腔热情 提交于 2020-01-01 09:27:15

问题


I have recently update play services using dependencies
compile 'com.google.android.gms:play-services:7.5.0'
My app icon launcher is in @mipmap/ic_launcher" but this is showing error in AndroidManifest.xml. Should i again place this icon in drawable or else ?
Help me to find out the solution.

UPDATE: Here is Messages from Android studio

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

回答1:


add followind line to application tag

    tools:replace="android:icon" 

Also import xmlns:tools="http://schemas.android.com/tools"to manifest




回答2:


under application tag in Manifest,worked for me.

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


来源:https://stackoverflow.com/questions/30618219/unable-to-use-androidicon-mipmap-ic-launcher-in-manifest-after-play-services

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!