Android Studio FAQs--Androidmanifest.xml coverage issues

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.