Is it possible to have different manifest files for the debug and release versions of my APK in Android Studio?
Normally I don\'t have need for such a such a thing b
Yes, it is possible. Use this paths:
Debug Manifest: ../src/debug/AndroidManifest.xml
Release Manifest: ../src/release/AndroidManifest.xml
Show Release Manifest on Android Studio:
Create a "debug" folder under src/ and put it in there: https://github.com/androidfu/Now-Playing/tree/master/app/src
My "release" manifest is in src/main/, but I'm pretty sure if you needed two wholly separate manifest files you could use src/release/ and src/debug/.
For those of us who have variants in their app and still need to customize the debug manifest for usage in their variants, these following bits of information might help:
src/debug
folder - then all variant's manifests will override this one. If you want to have the debug manifest to apply to only a particular variant then you should put it at src/variantnameDebug/AndroidManifest.xml
Detailed documentation on this merging is here: https://developer.android.com/studio/build/manifest-merge