cordova-android icon indicating copy to clipboard operation
cordova-android copied to clipboard

config-file doesn't remove from AndroidManifest.xml added-deleted settings

Open diegomesata opened this issue 2 years ago • 1 comments

Bug Report

Problem

If I add a custom setting to the config.xml file using config-file, build, and later I delete it, and build again, the custom setting will remain in the AndroidManifest.xml

What does actually happen?

  1. Add a custom setting to the config.xml file using config-file, by example "testx":
.....
  1. Run cordova build android. The AndroidManifest.xml is modified and the custom setting "testx" is added: <manifest ....

  2. Delete the custom setting "testx":

.....
  1. Run cordova build android. The "testx" remains in the AndroidManifest.xml.

<manifest ....

I tried remove it directly from the AndroidManifest.xml but the custom settings appers again on build.

What is expected to happen?

The custom settings should be removed.

<manifest ....

Version information

[email protected] node v16.20.0 windows 11

Checklist

  • [x] I searched for existing GitHub issues
  • [x] I updated all Cordova tooling to most recent version
  • [x] I included all the necessary information above

diegomesata avatar Jul 18 '23 17:07 diegomesata

In order to remove the setting I had to delete the android build folder, in the .grade folder the cache folder, the android.json file and remove the setting in the AndroidManifest.xml, and build it again.

diegomesata avatar Jul 18 '23 17:07 diegomesata