android - Manifest Merger error - tools:replace not working -


update:

i have tried everything. there wrong manifest merger tool?

  • tools:replace
  • tools:remove
  • tools:ignore
  • tools:node

unable resolve following error:

d:\androidstudioprojects\iknowthis2\app\src\main\androidmanifest.xml:29:9-36 error: attribute application@allowbackup value=(false) androidmanifest.xml:29:9-36 present @ [com.sackcentury:shinebutton:0.1.5] androidmanifest.xml:12:9-35 value=(true).      suggestion: add 'tools:replace="android:allowbackup"'to <application> element @ androidmanifest.xml:27:5-73:19 override.  d:\androidstudioprojects\iknowthis2\app\src\main\androidmanifest.xml:34:9-36 error:  attribute application@supportsrtl value=(false) androidmanifest.xml:34:9-36 present @ [com.sackcentury:shinebutton:0.1.5] androidmanifest.xml:14:9-35 value=(true). suggestion: add 'tools:replace="android:supportsrtl"' <application> element @ androidmanifest.xml:27:5-73:19 override. 

app's original manifest.xml - before tools:replace

 <?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="xyz">      <!-- include following permission if load images internet -->     <uses-permission android:name="android.permission.internet" />     <!-- include following permission if want cache images on sd card -->     <uses-permission android:name="android.permission.write_external_storage" />      <application         android:name=".abc"         android:allowbackup="false"         android:fullbackupcontent="false"         android:hardwareaccelerated="true"         android:icon="@mipmap/ic_launcher"         android:label="@string/app_name"         android:supportsrtl="false"         android:theme="@style/theme"         tools:ignore="googleappindexingwarning,unusedattribute">           <activity             android:name="com.facebook.facebookactivity"             android:configchanges="keyboard|keyboardhidden|screenlayout|screensize|orientation"             android:label="@string/app_name"             android:theme="@android:style/theme.translucent.notitlebar" />          <meta-data             android:name="com.facebook.sdk.applicationid"             android:value="@string/facebook_app_id" />          <activity             android:name=".activity.signinactivity"             android:windowsoftinputmode="adjustpan">             <intent-filter>                 <action android:name="android.intent.action.main" />                  <category android:name="android.intent.category.launcher" />             </intent-filter>         </activity>     </application>  </manifest> 

library's manifest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"     package="com.sackcentury.shinebuttonlib">      <application android:allowbackup="true" android:label="@string/app_name"         android:supportsrtl="true">      </application>  </manifest> 

in case,

removing tools:ignore manifest files , adding tools:replace="allowbackup,supportsrtl" worked me.

update:

one more solution looks promising, never tried it.

 <application     xmlns:tools="http://schemas.android.com/tools"  <-- added tools on application tag     android:name=".abc"     android:allowbackup="false"     android:fullbackupcontent="false"     android:hardwareaccelerated="true"     android:icon="@mipmap/ic_launcher"     android:label="@string/app_name"     android:supportsrtl="false"     android:theme="@style/theme"     tools:replace="allowbackup,supportsrtl"     tools:ignore="googleappindexingwarning,unusedattribute"> 

Comments