首页 > 解决方案 > 我收到此错误“处理清单失败”

问题描述

所以我收到了这个错误:

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 上开发。

标签: androidandroid-manifest

解决方案


我认为您错误地使用@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>

有关更多信息,请参阅:使用 Auto Backup developers.google.com 备份用户数据


推荐阅读