gpt4 book ai didi

Android 完整备份 : "file.xml is not in an included path"

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:04:02 24 4
gpt4 key购买 nike

我已经像示例中一样创建了备份规则文件 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 说有错误:

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

错误消息完全没有信息意义,也无法通过谷歌搜索(几乎所有单词都很短)。谁能解释一下,这个***想从我这里得到什么?如何解决这个问题?

最佳答案

我猜这是一个 IDE 错误,因为 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>如果您只是想排除一些文件,则清除错误,因为文档说

By default, Auto Backup includes almost all app files.

关于Android 完整备份 : "file.xml is not in an included path",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51690808/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com