android:allowBackup =“" true"关于"true"的错误 [英] android:allowBackup="true" error on "true"

查看:187
本文介绍了android:allowBackup =“" true"关于"true"的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到一个问题,我的代码在"true"上出现了 android:allowBackup ="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">

请告诉我答案

推荐答案

这是因为在您的某些库中,至少有一个库使用显式设置为false的 allowBackup .您可以在清单中使用 tools:replace .

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>

这篇关于android:allowBackup =“&quot; true&quot;关于"true"的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆