MANIFEST MERGER: It is possible to see the resulting mixed Manifest?
Asked Answered
M

4

55

I have a library module with a huge manifest. Also i have a application module with a huge manifest very similar to my library manifest but with package name changes. Now i want to see the resulting mixed manifest of Manifest Merger process.

How can i see it?

Maitland answered 19/8, 2015 at 6:20 Comment(0)
P
74

You find the manifest in your build folder, e.g.

/project/module/build/intermediates/manifests/full/debug/AndroidManifest.xml

Pulchritude answered 19/8, 2015 at 6:45 Comment(4)
thanks. It is possible to tell android studio that must use application manifest and ignore 100% content of library manifest?Maitland
Yes, look at the documentation: tools.android.com/tech-docs/new-build-system/user-guide/….Pulchritude
but i don't want to remove an atribute, i want to ignore 100% of the manifest. Can't find it in documentationMaitland
In my situation it is located in /project/module/build/intermediates/merged_manifests/debug/AndroidManifest.xmPeterus
C
81

In Android Studio 3.3 you can also see Merged Manifest by clicking on Merged Manifest tab. It's showed at the bottom of the editor pane when you open your standard project manifest.

enter image description here

see documentation: Merge multiple manifest files

Chong answered 12/3, 2019 at 13:26 Comment(3)
This is better than the accepted answer. It not only shows the merged result but the sources of the result and links to open the individual library manifest files.Strident
Ahh yes thanks! My app got rejected twice because some dependency was adding permissions to the Manifest without me noticing. I was able to track down the guilty dependency thanks to your solution.Joinder
For me this preview is sadly not reliable as of now and the built manifest actually includes permissions not listed in this preview. Hence I prefer to view the manifest as described below /project/module/build/intermediates/manifests/full/debug/AndroidManifest.xml In addition one can also see in the merge report where each permission etc. is coming from /project/module/build/outputs/logs/manifest-merger-build_flavour-report.txtAphid
P
74

You find the manifest in your build folder, e.g.

/project/module/build/intermediates/manifests/full/debug/AndroidManifest.xml

Pulchritude answered 19/8, 2015 at 6:45 Comment(4)
thanks. It is possible to tell android studio that must use application manifest and ignore 100% content of library manifest?Maitland
Yes, look at the documentation: tools.android.com/tech-docs/new-build-system/user-guide/….Pulchritude
but i don't want to remove an atribute, i want to ignore 100% of the manifest. Can't find it in documentationMaitland
In my situation it is located in /project/module/build/intermediates/merged_manifests/debug/AndroidManifest.xmPeterus
G
20

The Merged Manifest tab in Android Studio is useful to check the source of entries, but it's very limited (you can't select or search the text).

I prefer opening the merged manifest XML file directly, which is located here: <project>/<module>/build/intermediates/merged_manifests/<build_flavor_name>

Goodwife answered 3/2, 2021 at 9:47 Comment(1)
Start typing text to search for it. You can navigate through the results using the up and down arrow keysCitystate
K
0

Another useful info about how to generate the merged manifest:

./gradlew process<flavor_name>Manifest

Just replace the flavor name with the target one, like debug/release etc.

./gradlew processReleaseManifest

Kurgan answered 4/12, 2023 at 10:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.