apache / cordova-android

Apache Cordova Android
https://cordova.apache.org/
Apache License 2.0
3.59k stars 1.52k forks source link

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

Open diegomesata opened 9 months ago

diegomesata commented 9 months ago

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":

    .....
  2. Run cordova build android. The AndroidManifest.xml is modified and the custom setting "testx" is added: <manifest ....

  3. Delete the custom setting "testx":

    .....
  4. 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

cordova-lib@12.0.1 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 commented 9 months ago

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.