138
Views
7
Comments
Solved
[allowBackup Android Plugin] Could not generate android app
Question
Forge component by Miguel 'Kelter' Antunes
5
Published on 26 Jan 2021

Hi Miguel, I was trying to install this plugin and I can't generate the android app, I got this error on the build log


This has ever happened to you?


Failed to install 'cordova-plugin-allow-backup': Error: cordova-plugin-allow-backup cannot be added. <edit-config> changes in this plugin conflicts with <edit-config> changes in config.xml. Conflicts must be resolved before plugin can be added.
    at PlatformMunger.add_plugin_changes (/opt/NativeBuilder/builds/11145fcb-560f-40ec-b23c-df056ab42ad7/source/platforms/android/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js:133:19)
    at /opt/NativeBuilder/builds/11145fcb-560f-40ec-b23c-df056ab42ad7/source/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:123:29
    at _fulfilled (/opt/NativeBuilder/builds/11145fcb-560f-40ec-b23c-df056ab42ad7/source/platforms/android/cordova/node_modules/q/q.js:854:54)
    at self.promiseDispatch.done (/opt/NativeBuilder/builds/11145fcb-560f-40ec-b23c-df056ab42ad7/source/platforms/android/cordova/node_modules/q/q.js:883:30)
    at Promise.promise.promiseDispatch (/opt/NativeBuilder/builds/11145fcb-560f-40ec-b23c-df056ab42ad7/source/platforms/android/cordova/node_modules/q/q.js:816:13)
    at /opt/NativeBuilder/builds/11145fcb-560f-40ec-b23c-df056ab42ad7/source/platforms/android/cordova/node_modules/q/q.js:877:14
    at runSingle (/opt/NativeBuilder/builds/11145fcb-560f-40ec-b23c-df056ab42ad7/source/platforms/android/cordova/node_modules/q/q.js:137:13)
    at flush (/opt/NativeBuilder/builds/11145fcb-560f-40ec-b23c-df056ab42ad7/source/platforms/android/cordova/node_modules/q/q.js:125:13)
    at _combinedTickCallback (internal/process/next_tick.js:132:7)
    at process._tickCallback (internal/process/next_tick.js:181:9)
Error: cordova-plugin-allow-backup cannot be added. <edit-config> changes in this plugin conflicts with <edit-config> changes in config.xml. Conflicts must be resolved before plugin can be added.

[2019-02-27T11:31:45.128Z] [ERROR] Build failed with the following error: Error installing Cordova plugin: cordova-plugin-allow-backup.

mvp_badge
MVP
Rank: #3
Solution

Hi Filipe,

Yes, that already happened with me but with other plugins.

It seems that are conflicts between plugins, more than one is trying to change the same property in the config.xml file. Can you tell us if your app is using other plugins?

Cheers,
Miguel

Rank: #637

Yes, I have the MultiLingual, InAppBrowserPlugin, PrivacyScreenPlugin, ScreenOrientationPlugin, SecureDevicePlugin, SSLPinningPlugin and CipheredLocalStorage

Rank: #637

I think I got my answer, on the git of the cipheredLocalStorage it says this:


https://github.com/OutSystems/cordova-outsystems-secure-sqlite-bundle#v1.0.1

Limitations

Android Auto Backup for Apps is not compatible with Cipher Local Storage plugin which automatically backs up a user's data from apps that target and run on Android 6.0 (API level 23) or later in enabled in settings. Said that AndroidManifest.xml is modified to disable auto backup by setting android:allowBackup attribute to false, avoiding backing up or restoring the app data.

mvp_badge
MVP
Rank: #3

Yup it seem so Filipe.

That's for sure the reason behind that error. Nice app that you might have right there, with all that plugins on it :)

Cheers,
Miguel

Rank: #637

Yes, it is an app for the financial market  and I'm banging  my head because of some pen test issues.


But thanks for your help.

mvp_badge
MVP
Rank: #3

I know this is an old one, but the plugin was updated for MABS 7.0. Maybe this will also make it possible to use together with all that plugins.

Rank: #637

Thanks for the heads up, I don't have access to the project anymore, but will try to replicate the situation.