更新时间:2023-12-05 17:20:22
在清单的<application>
中添加android:allowBackup="false"
:
从文档中
是否允许应用程序参与备份和还原基础结构.如果将此属性设置为false,则即使通过全系统备份也不会执行应用程序的备份或还原,否则将导致所有应用程序数据通过adb保存.此属性的默认值为true.
Whether to allow the application to participate in the backup and restore infrastructure. If this attribute is set to false, no backup or restore of the application will ever be performed, even by a full-system backup that would otherwise cause all application data to be saved via adb. The default value of this attribute is true.