Arvind
Arvind

Reputation: 1

android:allowBackup="true" error on "true"

I have one problem my code has android:allowBackup="true" error on "true"

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.dsadas.bottombardmo">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

I used calculate distance project but there are many projects, when I create a project then error generate of in manifest file.

<application android:allowBackup="true">

Please tell me answer

Upvotes: 0

Views: 4303

Answers (1)

Giorgio Antonioli
Giorgio Antonioli

Reputation: 16224

That's because in some of your libraries, there's at least one that uses allowBackup set explicitly to false. You can use tools:replace in your manifest.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.dsadas.bottombardmo"
    xmlns:tools="http://schemas.android.com/tools">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        tools:replace="allowBackup">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

Upvotes: 3

Related Questions