You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/02/04 12:50:52 UTC

[GitHub] [cordova-android] Joannanas commented on issue #857: Android INTERNET access permissions not being added in AndroidManifest.xml using Cordova 9.0.0

Joannanas commented on issue #857:
URL: https://github.com/apache/cordova-android/issues/857#issuecomment-773281683


   I just struggled for a few days with a related and pretty annoying issue, and my conclusion might help to isolate the case. Everytime I run the "cordova run android" command line, it detects some non-existent conflict for the AndroidManifest and deletes one by one every permission added by the phonegap-barcodescanner used by my app, along with one of the "edit-config" from the cordova-plugin-push (this is what made me question everything)
   
   I thought that maybe I add something written in my config.xml file that really made a conflict, but I have no permission change in it, so the content of the config.xml alone is not the issue here.
   
   I tried the verbose option but it does not explicitly tell what is in conflict, so i tried to comment everything I have in my config.xml file, and I figured out that the conflict comes from trying to merge config into the application as follow : 
   ```xml 
   <edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application">
               <application android:theme="@style/AppTheme"/>
   </edit-config>
   ```
   
   It seems also relevant to say that I do not use the option "--force" when adding a plugin, but I still only have this small warning line "Conflict found, edit-config changes from config.xml will overwrite plugin.xml changes" everytime I use the "cordova run android" command, ONLY when I have the previous merge in my config.xml file. If I comment it, no conflict is detected and all my permissions/edit-config stay in the generated AndroidManifest.
   
   So, TLDR, my permissions are deleted when doing `cordova run android`command by the fact that I have an edit-config trying to merge an atrribute to my application tag. The edit-config is then done, but every run command deletes some line from the generated AndroidManifext.xml.


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org