How to add more than one `tools:replace` in Android Manifest Application?

AndroidAndroid Manifest

Android Problem Overview


I'm using a library that has the below in its Manifest.

<application android:allowBackup="true"
    android:label="@string/app_name"
    android:supportsRtl="true"/>

However, as the application that I use to include the library the reverse of the setting instead

<application android:allowBackup="false"
    android:label="@string/app_name"
    android:supportsRtl="false"/>

Hence it would have merger error like https://stackoverflow.com/questions/39178130/is-androidsupportsrtl-true-in-the-library-manifest-essential-it-is-causing

To solve it, we just need to add the following to our Manifest application.

tools:replace="android:supportsRtl"

and

tools:replace="android:allowBackup"

However, adding two tools:replace will have error in compilation. How could I combine the two tools:replace?

I tried the below, and it's not working.

tools:replace="android:supportsRtl|android:allowBackup"

Android Solutions


Solution 1 - Android

As per Paul's answer in the comment for the question above, use the below solve my problem.

 tools:replace="android:supportsRtl,android:allowBackup"

Solution 2 - Android

Example:-

tools:replace="android:label,android:allowBackup,android:supportsRtl"

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionElyeView Question on Stackoverflow
Solution 1 - AndroidElyeView Answer on Stackoverflow
Solution 2 - AndroidBholendra SinghView Answer on Stackoverflow