Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

AndroidManifest android:allowBackup="true", Cannot replace to false

Discussion in 'Android' started by Divinitize1, Jun 25, 2019.

  1. Divinitize1

    Divinitize1

    Joined:
    May 27, 2019
    Posts:
    99
    HI, I've posted this on answerhub but no-one seems to know how to fix it so ill try here.

    Basically i want to set android:allowBackup="false".

    I am doing so in the Plugins/Android/GoogleMobileAdsPlugin/

    Doing so on it's own gives the message saying application@allowBackup=true in :GoogleMobileAdsPlugin collides with another value (see console for details)

    I have followed the console guidelines to add the tools replace

    Code (CSharp):
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <!--
    3. This Google Mobile Ads plugin library manifest will get merged with your
    4. application's manifest, adding the necessary activity and permissions
    5. required for displaying ads.
    6. -->
    7. <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"
    8.    package="com.google.unity.ads"
    9.    android:versionName="21"
    10.    android:versionCode="21">
    11.  <uses-sdk android:minSdkVersion="14"
    12.      android:targetSdkVersion="19" />
    13.      <application android:allowBackup="false" tools:replace="android:allowBackup">
    14.    <uses-library android:required="false" android:name="org.apache.http.legacy"/>
    15.    <!-- Your AdMob App ID will look similar to this sample ID: ca-app-pub-3940256099942544~3347511713 -->
    16.    <meta-data
    17.    android:name="com.google.android.gms.ads.APPLICATION_ID"
    18.    android:value=""/>
    19.  </application>
    20.  <uses-permission android:name="com.android.vending.BILLING" />
    21. </manifest>
    After trying to build with this i get the same error, saying i should use the tools:replace.

    I have opened and checked all manifest files inside my project and nowhere does android:allowBackup="true" in the normal manifest, however it does appear in the final manifest when the project is built which i can obviously not edit.

    Does anyone have any insight on why this happens, what's setting it to try and how i can change it?

    Thanks

    EDIT:
    Attached screenshot of errors.
     

    Attached Files:

    Last edited: Jun 25, 2019
  2. Divinitize1

    Divinitize1

    Joined:
    May 27, 2019
    Posts:
    99
    Anyone? any help would be greatly appreciated.
     
  3. hassancortex

    hassancortex

    Joined:
    Oct 27, 2019
    Posts:
    7
    Were you able to fix this?
    I have the same issue with an android build.
    I already added this step
    Set in AndroidManifest.xml::
    <application tools:replace="allowBackup" android.allowBackup="false"/>
    But I get build errors.

    I changed the value of allowBackup to True in this file
    \Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main - AndroidManifest.xml

    Still no luck.
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,457
    Which errors? For me visual studio was able to fix it with it's suggestion