I'm facing below using while compiling the project
Below are the error logs
Error:Execution failed for task ':sampleproject:processDebugAndroidTestManifest'.
> java.lang.IllegalArgumentException: Multiple entries with same key: android:allowBackup=REPLACE and android1:allowBackup=REPLACE
AndroidManifest.XML
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.sample.mini" >
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-sdk tools:overrideLibrary="com.sample.toolkit.payment"/>
<application
android:allowBackup="false"
android:icon="@mipmap/icn_app"
android:label="@string/app_name"
android:largeHeap="true"
android:supportsRtl="false"
android:theme="@style/MaterialTheme"
tools:replace="android:label, theme, allowBackup, android:icon,android:supportsRtl">
<activity
android:name="com.sample.SwiftActivity"
android:screenOrientation="portrait"
android:theme="@style/MaterialTheme" />
<activity
android:name="com.activities.TermsAndConditionActivity"
android:screenOrientation="portrait"
android:theme="@style/MaterialTheme" />
</application>
</manifest>
Try removing the spaces from your tools:replace list.
tools:replace="android:label,theme,allowBackup,android:icon,android:supportsRtl"
This fixed the build error for me, but I'm still trying to figure out why entries after the space are ignored
Try to add android: to the front of allowBackup in the tools:replace list
tools:replace="android:label,theme,android:allowBackup,android:icon,android:supportsRtl"
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