I have a backup.xml file located in my Cordova root directory. This file is used the regulate the auto-backup feature of Android6+ and is defined in my AndroidManifest.xml file as
android:fullBackupContent="@xml/backup"
in my config.xml file, I set up the file using the resource directive (Expecting it to copy the file to the target directory).
<resource-file src="backup.xml" target="platforms/android/app/src/main/res/xml/backup.xml" />
but my build fails with the following error.
/work/Quasar_Projects/eSentry/src-cordova/platforms/android/app/build/intermediates/merged_manifests/release/AndroidManifest.xml:49: AAPT: error: resource xml/backup (aka za.co.securesa.esentry:xml/backup) not found.
error: failed processing manifest.
Manually copying backup.xml from my project root to platforms/android/app/src/main/res/xml/backup.xml solves the issue and my build completes. I do however want to find the right way to copy my backup.xml from the root (Where it can be tracked by GIT) instead of using this copy "hack".
cordova --version - 9.0.0 (cordova-lib@9.0.1)
PS: I am trying to change the autobackup rules as suggested by the cordova.plugins.diagnostic plugin. from https://www.npmjs.com/package/cordova.plugins.diagnostic - To exclude this plugin's data, add the following rule to your XML backup rules: <exclude domain="sharedpref" path="Diagnostic.xml"/>
but no further information as to how to do this is given by the documentation (So if I am on the wrong path, please correct me).