The problem is as follows
D:\source-code\AndroidStudio\MyApplication\app\src\main\AndroidManifest.xml Error: (9) Attribute [email Protected] value= (@drawable/ic_launcher) from Androidmanifest.xml:14:9 Error: (+, 9) execution failed for task ': app: Processdebugmanifest '. > Manifest merger failed:attribute [email protected] value= (@drawable/ic_launcher) from Androidmanifest.xml:14:9 are a LSO present at Myapplication:library:unspecified:18:9 value= (@drawable/icon) suggestion:add ' tools:replace= ' android: Icon "' to <application> element @ androidmanifest.xml:12:5 to override
Workaround
Make the following changes in the app's androidmanifest.xml:
<ManifestXmlns:android= "Http://schemas.android.com/apk/res/android"xmlns:tools= "Http://schemas.android.com/tools" Package= "Com.leo.kang.demo"Android:versioncode= "1"Android:versionname= "1.0"><Uses-sdkandroid:minsdkversion= "8" Android:targetsdkversion=" 18 " /> <application android:allowbackup= "true" Android:icon=" @drawable/ic_launcher " Android:label= "@string/app_name" android:theme< Span style= "color: #0000ff;" >= "@style/apptheme" Tools:replace= "Android:icon, android:theme" >
Note two places:
1. Add:xmlns:tools= "Http://schemas.android.com/tools" on the manifest node
2. On the application node plus :tools:replace= "Android:icon, Android:theme"
Reference
Http://tools.android.com/tech-docs/new-build-system/user-guide/manifest-merger
<?XML version= "1.0" encoding= "Utf-8"?><Manifestxmlns:android= "Http://schemas.android.com/apk/res/android"Xmlns:tools= "Http://schemas.android.com/tools" Package= "Com.example.yanlei.selectmap"> <uses-permissionAndroid:name= "Android.permission.WRITE_EXTERNAL_STORAGE" /> <!--Create and delete file permissions in SDcard - <uses-permissionAndroid:name= "Android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/> <!--connection <a href= "http://www.it165.net/news/nhlw/" target= "_blank" class= "keylink" > Internet </a>internet Permissions - <uses-permissionAndroid:name= "Android.permission.INTERNET" /> <!--GPS Location Permissions - <uses-permissionAndroid:name= "Android.permission.ACCESS_COARSE_LOCATION" /> <uses-permissionAndroid:name= "Android.permission.ACCESS_FINE_LOCATION" /> <uses-featureandroid:glesversion= "0x00020000"android:required= "true" /> <ApplicationAndroid:allowbackup= "true"Android:icon= "@mipmap/ic_launcher"Android:label= "@string/app_name1"Android:roundicon= "@mipmap/ic_launcher_round"Android:supportsrtl= "true"Android:theme= "@style/apptheme"Tools:replace= "Android:icon,android:theme,android:label"> <ActivityAndroid:name=". Mainactivity "> <Intent-filter> <ActionAndroid:name= "Android.intent.action.MAIN" /> <categoryAndroid:name= "Android.intent.category.LAUNCHER" /> </Intent-filter> </Activity> </Application></Manifest>
Android Studio FAQs--Androidmanifest.xml coverage issues