How to disable manifest merging in Android Studio

I am having a hard time removing unnecessary (permissions) stuff from my manifest file after compiling and sigining a release version of my app.
I simply don’t want anything merged from other libraries’s manifest files. I have my own manifest file and thats it. no other manifest should be merged in

anyone knows how to completely disable manifest merging?

  • Java overriding methods when creating new instance of a class
  • Changing android signing key password
  • Not able to load data from cache okHttp & retrofit
  • How to dynamically remove items from ListView on a button click?
  • How to change programmatically the primary color in Android L
  • How to display validation error for a spinner widget similar to TextView.setError()
  • Related posts:

    How to set text to view from drawer header layout in navigation drawer without inflating view
    Android ImageView does not match_parent inside FrameLayout below GingerBread
    How to modify style of android “force close” window?
    Webview load html from assets directory
    Android ListView in fragment example
    Android , Java - Rendering a video using bitmap frames to reverse a video (Xuggler)
  • Get color-int from color resource
  • Force hide address bar in Chrome on Android
  • Android: Speech Recognition without using google server
  • How to check if users google account has been added on device before starting GCM procedure?
  • Get Application Directory
  • Using AudioManager interferes with call audio
  • 2 Solutions collect form web for “How to disable manifest merging in Android Studio”

    Try this

     android.applicationVariants.all{ variant ->
       variant.outputs.each { output ->
         output.processResources.manifestFile = file('AndroidManifest.xml')

    What you need to do is disable the processManifest task so that it doesn’t run and tell the processResources where the manifest to use is:

    android.applicationVariants.all { variant ->
        variant.processResources.manifestFile = file('src/main/AndroidManifest.xml')

    This should work.

    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.