I am using a gradle project with many different library dependencies and using the new manifest merger. In my <application />
tag I have it set up as such:
<application tools:replace="android:icon, android:label, android:theme, android:name" android:name="com.example.myapp.MyApplcation" android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/application_name" android:logo="@drawable/logo_ab" android:theme="@style/AppTheme" > .... </application>
Yet I am receiving the error:
/android/MyApp/app/src/main/AndroidManifest.xml:29:9 Error: Attribute application@icon value=(@drawable/ic_launcher) from AndroidManifest.xml:29:9 is also present at {Library Name} value=(@drawable/app_icon) Suggestion: add 'tools:replace="android:icon"' to <application> element at AndroidManifest.xml:26:5 to override /android/MyApp/app/src/main/AndroidManifest.xml:30:9 Error: Attribute application@label value=(@string/application_name) from AndroidManifest.xml:30:9 is also present at {Library Name} value=(@string/app_name) Suggestion: add 'tools:replace="android:label"' to <application> element at AndroidManifest.xml:26:5 to override /android/MyApp/app/src/main/AndroidManifest.xml:27:9 Error: Attribute application@name value=(com.example.myapp.MyApplication) from AndroidManifest.xml:27:9 is also present at {Another Library} Suggestion: add 'tools:replace="android:name"' to <application> element at AndroidManifest.xml:26:5 to override /android/MyApp/app/src/main/AndroidManifest.xml:32:9 Error: Attribute application@theme value=(@style/AppTheme) from AndroidManifest.xml:32:9 is also present at {Library Name} value=(@style/AppTheme) Suggestion: add 'tools:replace="android:theme"' to <application> element at AndroidManifest.xml:26:5 to override
The initial process would be to open the manifest application known as the AndroidManifest. xml and then click on the Merged Manifest tab below your edit pane. Following which, Click on the merged manifest option. An Error would be visible at the right column and then one must try to solve the error.
android:supportsRtl="true" enables support for right-to-left languages. Without this, layout will always be left-to-right, However by itself it does not change the layout to be from right to left. It simply enables other attributes - one of those new attributes controls whether is left-to-right or right-to-left.
The Android manifest file is a specially formatted XML file. You can edit the XML manually by clicking on the AndroidManifest. xml tab. Android manifest files generally include a single <manifest> tag with a single <application> tag.
Declare your manifest header like this
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.yourpackage" xmlns:tools="http://schemas.android.com/tools">
Then you can add to your application tag the following attribute:
<application tools:replace="icon, label" ../>
For example I need to replace icon and label. Good luck!
I fixed same issue. Solution for me:
xmlns:tools="http://schemas.android.com/tools"
line in the manifest tagtools:replace=..
in the manifest tagandroid:label=...
in the manifest tagExample:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" tools:replace="allowBackup, label" android:allowBackup="false" android:label="@string/all_app_name"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With