Describe the purpose of the AndroidManifest.xml file

This tests if you view the manifest as a contract with the OS. Define its role, then list key elements like components (<activity>), permissions (<uses-permission>), and hardware features. A red flag is just listing tags without explaining their purpose.
What's really being asked
Your understanding that the AndroidManifest.xml is not just a configuration file, but the primary contract between your application and the Android operating system. The interviewer is looking for more than a list of tags; they want to see that you understand how the OS uses this information to manage your app's lifecycle, security, and capabilities. It's a test of core Android platform knowledge.
The full answer
A strong answer has three parts. First, define the manifest's purpose: it's an XML file that describes essential information about the app that the Android build tools, the Android OS, and Google Play need to know before they can run any of the app's code. Second, list and explain the most critical elements. This includes the root <manifest> tag with the package name (the app's unique ID), the <application> tag for app-level properties like its icon and theme, component tags like <activity>, <service>, <receiver>, and <provider> to declare the app's entry points, <uses-permission> to request necessary permissions, and <intent-filter> to declare which intents a component can respond to. Third, add a senior-level touch by mentioning <uses-feature> to declare hardware/software requirements, which Google Play uses for filtering.
The mistakes people make
A weak answer just lists one or two tags, like <activity> and <uses-permission>, without context. A common red flag is describing the manifest as "where you configure the app," which is too generic and misses the key point that this configuration is for the operating system. Another mistake is confusing it with build configuration files like build.gradle, which control the build process itself (e.g., dependencies, signing configs), whereas the manifest describes the final app's structure and requirements to the OS. Forgetting to mention the package name declaration is a significant omission.
What usually comes next
Expect questions about manifest merging: "What happens if a library you include has a manifest with a conflicting attribute?" (Answer: Build tools use a priority system; the main app's manifest wins by default). Another is, "How would you handle different configurations for debug vs. release builds in the manifest?" (Answer: Use manifest placeholders in build.gradle and source sets for different manifest files). A third could be about intent filters: "Explain the difference between an explicit and an implicit intent and how the manifest is involved."
A concrete example
To declare an activity as the main entry point, you would write: <activity android:name=".MainActivity" android:exported="true"><intent-filter><action android:name="android.intent.action.MAIN" /><category android:name="android.intent.category.LAUNCHER" /></intent-filter></activity>. The MAIN action and LAUNCHER category tell the system to place this activity's icon in the app launcher. The android:exported="true" is required for launcher activities on API 31+.
Interview question
Which statement best describes the fundamental role of the AndroidManifest.xml file in an Android application?
- a.It serves as a generic configuration file for setting up the application's internal logic and data structures.
- b.It primarily defines the application's build process, including dependencies, signing configurations, and build variants.
- c.It is used to manage the application's user interface layouts, styles, and resource files for different screen sizes.
- d.It acts as a contract with the Android operating system, declaring the app's essential components, required permissions, and hardware features.Correct
Why? this is the answer
The AndroidManifest.xml file is a contract with the OS, informing it about the app's components, permissions, and requirements. Option B is incorrect because build configuration (dependencies, signing) is handled by build.gradle, not the manifest.
Just read this? Test yourself on what you have been reading.
Read the original → developer.android.com
You just looked this up. Could you explain it out loud?
That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on android — each one lists the topics its interview covers.
See open roles