Stephane84 opened a new issue #1245: URL: https://github.com/apache/cordova-android/issues/1245
# Bug Report Hello, I need to add in my AndroidManifest.xml `<queries>` with package name of app i interact with, to make it works with Android API 30 app builded on Android 11 devices (see : https://developer.android.com/training/package-visibility/declaring) ## Problem i need to use edit-config in my config.xml to do it, like this but it doesn't work : ``` <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest" xmlns:android="http://schemas.android.com/apk/res/android"> <queries> <package android:name="my.package.name"/> </queries> </edit-config> ``` ### What is expected to happen? When running the command cordova prepare android with this edit config, it should add in AndroidManifest.xml the queries elements : ``` <queries> <package android:name="my.package.name" /> </queries> ``` ### What does actually happen? using edit-config with mode="merge" mode="overwrite" or no mode doesn't add the queries tags in AndroidManifest.xml Oddly, when i put anything wrong in the mode attribute, it's work ... I can't understand why ??? Like this exemple, with mode="magic" . See : <edit-config file="app/src/main/AndroidManifest.xml" mode="magic" target="/manifest" xmlns:android="http://schemas.android.com/apk/res/android"> <queries> <package android:name="my.package.name"/> </queries> </edit-config> ``` Then, here, my queries is added in AndroidManifest.xml ## Information <!-- Include all relevant information that might help understand and reproduce the problem --> I tried with cordova-android 9.0.0, 9.1.0 and 10.0.0-nightly.2021.6.6.6d803e2f Nothing works Maybe, it's not an issue of cordova-android, but cordova-cli ? If i need to change the issue to other repo, please let me know. ### Environment, Platform, Device Windows ### Version information Node : 14.16.1 Npm : 6.14.12 cordova cli : 10.0.0 ## Checklist <!-- Please check the boxes by putting an x in the [ ] like so: [x] --> - [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 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
