我收到此错误 "Failed processing manifest "

I am getting this error "Failed processing manifest "

所以我收到了这个错误:

Android resource linking failed
Output:  C:\Users\tomas\AndroidStudioProjects\app\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml:11: error: '@android:' is incompatible with attribute fullBackupContent (attr) reference|boolean.
error: failed processing manifest.

在我的应用程序上,我目前正在 android studio 上开发。

@android:' is incompatible with attribute fullBackupContent (attr)

AndroidManifest.xml<application 标签的 fullBackupContent 中,您设置了如下内容:

@android/anything

或者 @android

这不是真的,它只需要像 truefalse 这样的布尔值。

检查错误:

reference|boolean.

我认为您错误地使用了 @android/name_of_file_for_backup_rules 代替了 @xml/。 fullBackupContent 属性指向包含备份规则的 XML 文件。例如:

<application ...
    android:fullBackupContent="@xml/my_backup_rules">
</application>

必须在 res/xml 中为备份规则创建 my_backup_rules.xml。 例如:

<?xml version="1.0" encoding="utf-8"?>
<full-backup-content>
    <include domain="sharedpref" path="."/>
    <exclude domain="sharedpref" path="device.xml"/>
</full-backup-content>

更多信息请参考:Back up user data with Auto Backup developers.google.com: