Whenever I run an Android emulator, AndroidManifest.xml get changed

I am using Ionic 6 with React. I run the following command to start up Android emulator:

ionic cap run android -l --external --target Pixel_5_API_33

The emulator starts up, but right away the AndroidManifest.xml file get updated and an AndroidManifest.xml.org file is added.

When I shut the emulator down, everything goes back to normal. In other words, the changes to the AndroidManifest.xml are reverted and the AndroidManifest.xml.org is deleted.

I’ve not seen any equivalent behavior with ios.

I believe what you’re seeing is the XML file getting updated to correctly handle the live reload parameter. It needs to be run differently to support that mode, so it updates the XML file with the relevant changes, then reverts those changes when you stop running.

Only thing is that the date in the updated AndroidManifest.xml is identical to the AndroidManifest.xml.orig file. Just the formatting is changed.

I’m new to Ionic. Are you saying this is normal behavior?

Yes, it is normal behavior. For me, it adds android:usesCleartextTraffic="true" and android:name="androidx.core.content.FileProvider" while running.