Android完整备份:“ file.xml不在包含的路径中” [英] Android full backup: "file.xml is not in an included path"

查看:100
本文介绍了Android完整备份:“ file.xml不在包含的路径中”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了备份规则文件,就像示例 https:// developer一样。 android.com/guide/topics/data/autobackup

I've created backup rules file just like in example https://developer.android.com/guide/topics/data/autobackup:

<?xml version="1.0" encoding="utf-8"?>
<full-backup-content xmlns:android="http://schemas.android.com/apk/res/android">
    <include
        domain="sharedpref"
        path="." />
    <exclude
        domain="sharedpref"
        path="nonceStorage.xml" />
    <exclude
        domain="sharedpref"
        path="localStorage.xml" />
</full-backup-content>

和Android Studio表示存在错误:

and Android Studio say's that there are errors:

Error:(8, 15) `nonceStorage.xml` is not in an included path [FullBackupContent]
Error:(11, 15) `localStorage.xml` is not in an included path [FullBackupContent]

错误消息完全没有信息,也不能通过谷歌搜索(几乎所有单词都是很短)。
谁能解释,这***想要我做什么?如何解决此问题?

Error message is totally uninformative and not googleable (almost all words are very short). Can anyone explain,what does this *** want from me? How to fix this issue?

推荐答案

我猜这是一个IDE错误,因为文档中的示例

I guess this is an IDE bug because the example from doc:

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

device.xml 上显示相同的错误

如果您只想排除某些文件,则删除< include> 会清除错误,因为文档说

Removing the <include> clears the error if you simply want to exclude some files because the doc says


默认情况下,自动备份包含几乎所有应用程序文件。

By default, Auto Backup includes almost all app files.

这篇关于Android完整备份:“ file.xml不在包含的路径中”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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