App manifest overview  |  App architecture  |  Android Developers Skip to main content Essentials Build AI experiences Build AI-powered Android apps with Gemini APIs and more. Get started Get started Create your first app. Use Compose for UI and adaptive app development to support multiple device form factors. Hello, world! Developer Verification Adaptive apps Compose for UI AI-powered IDE Training Monetization with Play ↗️ Optimize by form factor Build apps that optimize the user experience on phones, tablets, foldables, cars, XR, and more. Phones, tablets, foldables Android for Cars Android TV Android XR Googlebook ChromeOS Wear OS Build by category Learn to build for your use case by following Google's prescriptive and opinionated guidance. Games Camera & media Social & messaging Health & fitness Productivity Enterprise apps Get the latest Stay in touch with the latest releases throughout the year, join our preview programs, and give us your feedback. Latest updates Experimental updates Android Studio preview Jetpack & Compose libraries Wear OS releases Privacy Sandbox ↗️ Design & Plan Excellent Experiences Build the best experiences for your best users. Learn more UI Design Design a beautiful user interface using Android best practices. Design for Android Mobile Desktop experiences XR Headsets & XR Glasses AI Glasses Widgets Wear OS Android TV Android for Cars Architecture Design robust, testable, and maintainable app logic and services. Introduction Libraries Navigation Modularization Testing Kotlin Multiplatform Quality Plan for app quality and align with Play store guidelines. Overview Core value User experience Accessibility Technical quality Excellent Experiences Security Safeguard users against threats and ensure a secure Android experience. Overview Privacy Permissions Identity Fraud prevention Develop Gemini in Android Studio Your AI development companion for Android development. Learn more Get Android Studio Core areas Get the samples and docs for the features you need. Samples Multidevice support User interfaces Background work Data and files Connectivity All core areas ⤵️ Tools and workflow Use the IDE to write and build your app, or create your own pipeline. Write and debug code Build projects Test your app Performance Command-line tools Gradle plugin API Android Bench Device tech Write code for form factors. Connect devices and share data. Phones, tablets, foldables ChromeOS Android for Cars Android TV Android XR Wear OS Android Health Better Together All devices ⤵️ Libraries Browse API reference documentation with all the details. Android platform Jetpack libraries Compose libraries Google Play services ↗️ Google Play SDK index ↗️ Google Play Play Console Publish your app or game and grow your business on Google Play. Go to Play Console Learn more ↗️ Fundamentals Learn how to engage users, monitize, and secure your app. Play Monetization Play Integrity Play Policies Play Programs ↗️ Games Dev Center Develop and deliver games. Get tools, downloads, and samples. Overview Play Asset Delivery Play Games Services Play Games on PC Level Up guidelines All Play guides ⤵️ Libraries Browse API reference documentation with all the details. Play Feature Delivery Play In-app Updates Play In-app Reviews Play Install Referrer Google Play services ↗️ Google Play SDK index ↗️ All Play libraries ⤵️ Tools & resources Tools for publishing, promoting, and managing your app. Android App Bundles Brand & marketing Play Console APIs ↗️ Blog the Android Developer's Blog Read the latest Explore the authors → Explore categories Case Studies Real-world results from real-world users. Explore how different teams use our tools to achieve their goals. Events & Programs Get the details on upcoming webinars, workshops, meetups, and special initiatives designed to help you grow. Product News Stay in the loop with the latest updates, feature releases, and behind-the-scenes looks at how we’re evolving. Community Discover stories from our users, spotlight features, and the collaborative projects that bring us all together. How-tos From quick tips to deep-dive tutorials, these step-by-step guides are designed to help you work smarter and faster. / English Deutsch Español – América Latina Français Indonesia Italiano Polski Português – Brasil Tiếng Việt Türkçe Русский עברית العربيّة فارسی हिंदी বাংলা ภาษาไทย 中文 – 简体 中文 – 繁體 日本語 한국어 Android Studio Sign in App architecture Essentials More Design & Plan More Develop More Google Play More Blog More Android Studio Introduction Guide to app architecture About app architecture Architecture recommendations Learning pathway ⍈ App fundamentals UI layer libraries About the UI layer UI events State holders and UI state State production Lifecycle-aware components Lifecycles Handle lifecycles ViewModel About ViewModel Create ViewModels with dependencies ViewModel Scoping APIs Saved State module for ViewModel ViewModel APIs cheat sheet Save UI states Use Kotlin coroutines with lifecycle-aware components Paging Library About paging Load and display paged data Page from network and database Transform data streams Manage and present loading states Test your Paging implementation Migrate to Paging 3 Domain layer Data layer libraries About the data layer Offline first DataStore WorkManager ⍈ App startup Modularization About modularization Common patterns App resources About app resources Handle configuration changes Localization Localize your app Test your app with pseudolocales Unicode and internationalization support Language and locale resolution Per-app language preferences Resource types String Fonts More resource types App manifest file About app manifests <action> <activity> <activity-alias> <application> <attribution> <category> <compatible-screens> <data> <grant-uri-permission> <instrumentation> <intent-filter> <layout> <manifest> <meta-data> <path-permission> <permission> <permission-group> <permission-tree> <profileable> <property> <provider> <queries> <receiver> <service> <supports-gl-texture> <supports-screens> <uri-relative-filter-group> <uses-configuration> <uses-feature> <uses-library> <uses-native-library> <uses-permission> <uses-permission-sdk-23> <uses-sdk> App entry points Activities Introduction to activities The activity lifecycle Activity state changes Test your app's activities Tasks and the back stack Processes and app lifecycle Parcelables and bundles Recents screen Activity security Add app shortcuts ⍈ App navigation Principles of navigation Navigation component Overview Navigation controller Design your navigation graph Overview Dialog destinations Activity destinations Nested graphs Deep links New destination types Type safety Encapsulate your code Global actions Fragments and the Kotlin DSL Use the Navigation editor Use your navigation graph Navigate to a destination Navigate with options Safe args Pass data between destinations Animate transitions between destinations Conditional navigation Interact programmatically with the Navigation component The back stack Overview Dialogs and the back stack Circular navigation and the back stack Multiple back stacks Integrations Navigate with feature modules Multi-module projects Connect UI components to NavController Migrate to the Navigation component Test navigation Test fragment navigation Test Compose navigation Custom back navigation Custom back navigation Predictive back gesture Add support for predictive back animations Add support for predictive back animations in Views Navigation Event Overview Set up development environment Handle back gestures and animations Set up a dispatcher Responsive design Handling configuration changes Design for different form factors Swipe between views Swipe views using ViewPager2 Swipe views using ViewPager Navigation 3 Overview Get started Understand and implement the basics Save and manage navigation state Configure metadata Modularize navigation code Create custom layouts using Scenes Overview Modify scenes with scene decorators Animate between destinations Apply logic or wrappers to destinations Migrate from Navigation 2 Fragments About fragments Create a fragment Fragment manager Fragment transactions Animate transitions between fragments Fragment lifecycle Saving state with fragments Communicate with fragments Working with the app bar Displaying dialogs with DialogFragment Debug your fragments Test your fragments Deep links About deep links Create deep links Implement App Links About App Links Add intent filters Configure website associations Verify App Links Test App Links Troubleshoot App Links FAQ Developer tools Interact with other apps About interacting with other apps About intents and intent filters About common intents Google Maps intents for Android Send users to another app Get a result from an activity Allow other apps to start your activity Limit loading in on-device Android containers Package visibility About package visibility Know which packages are visible automatically Declare package visibility needs Fulfill common use cases Test package visibility Dependency injection About dependency injection Manual dependency injection Dependency injection with Hilt Hilt in multi-module apps Use Hilt with other Jetpack libraries Hilt testing guide Hilt and Dagger annotations cheat sheet Dagger Dagger basics Using Dagger in Android apps Using Dagger in multi-module apps Build AI experiences Get started Get started Hello, world! Developer Verification Adaptive apps Compose for UI AI-powered IDE Training Monetization with Play ↗️ Optimize by form factor Phones, tablets, foldables Android for Cars Android TV Android XR Googlebook ChromeOS Wear OS Build by category Games Camera & media Social & messaging Health & fitness Productivity Enterprise apps Get the latest Latest updates Experimental updates Android Studio preview Jetpack & Compose libraries Wear OS releases Privacy Sandbox ↗️ Excellent Experiences Learn more UI Design Design for Android Mobile Desktop experiences XR Headsets & XR Glasses AI Glasses Widgets Wear OS Android TV Android for Cars Architecture Introduction Libraries Navigation Modularization Testing Kotlin Multiplatform Quality Overview Core value User experience Accessibility Technical quality Excellent Experiences Security Overview Privacy Permissions Identity Fraud prevention Gemini in Android Studio Learn more Get Android Studio Core areas Samples Multidevice support User interfaces Background work Data and files Connectivity All core areas ⤵️ Tools and workflow Write and debug code Build projects Test your app Performance Command-line tools Gradle plugin API Android Bench Device tech Phones, tablets, foldables ChromeOS Android for Cars Android TV Android XR Wear OS Android Health Better Together All devices ⤵️ Libraries Android platform Jetpack libraries Compose libraries Google Play services ↗️ Google Play SDK index ↗️ Play Console Go to Play Console Learn more ↗️ Fundamentals Play Monetization Play Integrity Play Policies Play Programs ↗️ Games Dev Center Overview Play Asset Delivery Play Games Services Play Games on PC Level Up guidelines All Play guides ⤵️ Libraries Play Feature Delivery Play In-app Updates Play In-app Reviews Play Install Referrer Google Play services ↗️ Google Play SDK index ↗️ All Play libraries ⤵️ Tools & resources Android App Bundles Brand & marketing Play Console APIs ↗️ the Android Developer's Blog Read the latest Explore the authors → Explore categories Case Studies Events & Programs Product News Community How-tos Android Developers Design & Plan App architecture App manifest overview Stay organized with collections Save and categorize content based on your preferences. Every app project must have an AndroidManifest.xml file, with precisely that name, at the root of the project source set. The manifest file describes essential information about your app to the Android build tools, the Android operating system, and Google Play. Among many other things, the manifest file is required to declare the following: The components of the app, including all activities, services, broadcast receivers, and content providers. Each component must define basic properties, such as the name of its Kotlin or Java class. It can also declare capabilities, such as which device configurations it can handle, and intent filters that describe how the component can be started. Read more about app components in a following section. The permissions that the app needs in order to access protected parts of the system or other apps. It also declares any permissions that other apps must have if they want to access content from this app. Read more about permissions in a following section. The hardware and software features the app requires, which affects which devices can install the app from Google Play. Read more about device compatibility in a following section. If you're using Android Studio to build your app, the manifest file is created for you and most of the essential manifest elements are added as you build your app, especially when using code templates. File features The following sections describe how some of the most important characteristics of your app are reflected in the manifest file. App components For each app component that you create in your app, declare a corresponding XML element in the manifest file: <activity> for each subclass of Activity <service> for each subclass of Service <receiver> for each subclass of BroadcastReceiver <provider> for each subclass of ContentProvider If you subclass any of these components without declaring it in the manifest file, the system can't start it. Specify the name of your subclass with the name attribute, using the full package designation. For example, an Activity subclass is declared as follows: <manifest ... > <application ... > <activity android:name="com.example.myapp.MainActivity" ... > </activity> </application> </manifest> However, if the first character in the name value is a period, the app's namespace, from the module-level build.gradle file's namespace property, is prefixed to the name. For example, if the namespace is "com.example.myapp", the following activity name resolves to com.example.myapp.MainActivity: <manifest ... > <application ... > <activity android:name=".MainActivity" ... > ... </activity> </application> </manifest> For more information about setting the package name or namespace, see Set the namespace. If you have app components that reside in sub-packages, such as in com.example.myapp.purchases, the name value must add the missing sub-package names, such as ".purchases.PayActivity", or use the fully qualified package name. Intent filters App activities, services, and broadcast receivers are activated by intents. An intent is a message defined by an Intent object that describes an action to perform, including the data to be acted on, the category of component that is expected to perform the action, and other instructions. When an app issues an intent to the system, the system locates an app component that can handle the intent based on intent filter declarations in each app's manifest file. The system launches an instance of the matching component and passes the Intent object to that component. If more than one app can handle the intent, then the user can select which app to use. An app component can have any number of intent filters (defined with the <intent-filter> element), each one describing a different capability of that component. For more information, see the Intents and Intent Filters document. Icons and labels A number of manifest elements have icon and label attributes for displaying a small icon and a text label, respectively, to users for the corresponding app component. In every case, the icon and label that are set in a parent element become the default icon and label value for all child elements. For example, the icon and label that are set in the <application> element are the default icon and label for each of the app's components, such as all activities. The icon and label that are set in a component's <intent-filter> are shown to the user whenever that component is presented as an option to fulfill an intent. By default, this icon is inherited from whichever icon is declared for the parent component, either the <activity> or <application> element. You might want to change the icon for an intent filter if it provides a unique action that you'd like to better indicate in the chooser dialog. For more information, see Allow other apps to start your activity. Permissions Android apps must request permission to access sensitive user data, such as contacts and SMS, or certain system features, such as the camera and internet access. Each permission is identified by a unique label. For example, an app that needs to send SMS messages must have the following line in the manifest: <manifest ... > <uses-permission android:name="android.permission.SEND_SMS"/> ... </manifest> Beginning with Android 6.0 (API level 23), the user can approve or reject some app permissions at runtime. But no matter which Android version your app supports, you must declare all permission requests with a <uses-permission> element in the manifest. If the permission is granted, the app is able to use the protected features. If not, its attempts to access those features fail. Your app can also protect its own components with permissions. It can use any of the permissions that are defined by Android, as listed in android.Manifest.permission, or a permission that's declared in another app. Your app can also define its own permissions. A new permission is declared with the <permission> element. For more information, see Permissions on Android. Device compatibility The manifest file is also where you can declare what types of hardware or software features your app requires and, by extension, which types of devices your app is compatible with. Google Play Store doesn't let users install your app on devices that don't provide the features or system version that your app requires. There are several manifest tags that define which devices your app is compatible with. The following are some of the most common. <uses-feature> The <uses-feature> element lets you declare hardware and software features your app needs. For example, if your app can't achieve basic functionality on a device without a compass sensor, you can declare the compass sensor as required with the following manifest tag: <manifest ... > <uses-feature android:name="android.hardware.sensor.compass" android:required="true" /> ... </manifest> Note: If you want to make your app available on Chromebooks, there are some important hardware and software feature limitations to consider. For more information, see App manifest compatibility for Chromebooks. <uses-sdk> Each successive platform version often adds new APIs not available in the previous version. To indicate the minimum version with which your app is compatible, your manifest must include the <uses-sdk> tag and its minSdkVersion attribute. However, be aware that attributes in the <uses-sdk> element are overridden by corresponding properties in the build.gradle file. So, if you're using Android Studio, specify the minSdkVersion and targetSdkVersion values there instead: Groovy android { defaultConfig { applicationId 'com.example.myapp' // Defines the minimum API level required to run the app. minSdkVersion 23 // Specifies the API level used to test the app. targetSdkVersion 36 ... } } Kotlin android { defaultConfig { applicationId = "com.example.myapp" // Defines the minimum API level required to run the app. minSdkVersion(23) // Specifies the API level used to test the app. targetSdkVersion(36) ... } } For more information about the build.gradle file, read about how to configure your build. To learn more about how to declare your app's support for different devices, see the Device compatibility overview. File conventions This section describes the conventions and rules that generally apply to all elements and attributes in the manifest file. Elements Only the <manifest> and <application> elements are required. They each must occur only once. Most of the other elements can occur zero or more times. However, some of them must be present to make the manifest file useful. All values are set through attributes, not as character data within an element. Elements at the same level are generally not ordered. For example, the <activity>, <provider>, and <service> elements can be placed in any order. There are two key exceptions to this rule: An <activity-alias> element must follow the <activity> for which it is an alias. The <application> element must be the last element inside the <manifest> element. Attributes Technically, all attributes are optional. However, many attributes must be specified so that an element can accomplish its purpose. For truly optional attributes, the reference documentation indicates the default values. Except for some attributes of the root <manifest> element, all attribute names begin with an android: prefix, such as android:alwaysRetainTaskState. Because the prefix is universal, the documentation generally omits it when referring to attributes by name. Multiple values If more than one value can be specified, the element is almost always repeated, rather than multiple values being listed within a single element. For example, an intent filter can list several actions: <intent-filter ... > <action android:name="android.intent.action.EDIT" /> <action android:name="android.intent.action.INSERT" /> <action android:name="android.intent.action.DELETE" /> ... </intent-filter> Resource values Some attributes have values that are displayed to users, such as the title for an activity or your app icon. The value for these attributes might differ based on the user's language or other device configurations (such as to provide a different icon size based on the device's pixel density), so the values should be set from a resource or theme, instead of hardcoded into the manifest file. The actual value can then change based on alternative resources that you provide for different device configurations. Resources are expressed as values with the following format: "@[package:]type/name" You can omit the package name if the resource is provided by your app (including if it is provided by a library dependency, because library resources are merged into yours). The only other valid package name is android, when you want to use a resource from the Android framework. The type is a type of resource, such as string or drawable, and the name is the name that identifies the specific resource. Here is an example: <activity android:icon="@drawable/smallPic" ... > For more information about how to add resources to your project, read App resources overview. To instead apply a value that's defined in a theme, the first character must be ? instead of @: "?[package:]type/name" String values Where an attribute value is a string, use double backslashes (\\) to escape characters, such as \\n for a newline or \\uxxxx for a Unicode character. Manifest elements reference The following table provides links to the reference documents for all valid elements in the AndroidManifest.xml file. <action> Adds an action to an intent filter. <activity> Declares an activity component. <activity-alias> Declares an alias for an activity. <application> Declares the application. <category> Adds a category name to an intent filter. <compatible-screens> Specifies each screen configuration the application is compatible with. <data> Adds a data specification to an intent filter. <grant-uri-permission> Specifies the subsets of app data that the parent content provider has permission to access. <instrumentation> Declares an Instrumentation class that lets you monitor an application's interaction with the system. <intent-filter> Specifies the types of intents that an activity, service, or broadcast receiver can respond to. <manifest> The root element of the AndroidManifest.xml file. <meta-data> A name-value pair for an item of additional, arbitrary data that can be supplied to the parent component. <path-permission> Defines the path and required permissions for a specific subset of data within a content provider. <permission> Declares a security permission that can be used to limit access to specific components or features of this or other applications. <permission-group> Declares a name for a logical grouping of related permissions. <permission-tree> Declares the base name for a tree of permissions. <provider> Declares a content provider component. <queries> Declares the set of other apps that your app intends to access. Learn more in the guide about package visibility filtering. <receiver> Declares a broadcast receiver component. <service> Declares a service component. <supports-gl-texture> Declares a single GL texture compression format that the app supports. <supports-screens> Declares the screen sizes your app supports and enables screen compatibility mode for screens larger than what your app supports. <uses-configuration> Indicates specific input features the application requires. <uses-feature> Declares a single hardware or software feature that is used by the application. <uses-library> Specifies a shared library that the application must be linked against. <uses-native-library> Specifies a vendor-provided native shared library that the app must be linked against. <uses-permission> Specifies a system permission that the user must grant in order for the app to operate correctly. <uses-permission-sdk-23> Specifies that an app wants a particular permission, but only if the app is installed on a device running Android 6.0 (API level 23) or higher. <uses-sdk> Lets you express an application's compatibility with one or more versions of the Android platform, by means of an API level integer. Limits The following tags have a limit on the number of occurrences in a manifest file: Tag Name Limit <package> 1000 <meta-data> 1000 <uses-library> 1000 The following attributes have a limit on their maximum length: Attribute Limit name 1024 versionName 1024 host 255 mimeType 255 Example manifest file The XML below is a simple example AndroidManifest.xml that declares two activities for the app. <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0"> <!-- Beware that these values are overridden by the build.gradle file --> <uses-sdk android:minSdkVersion="15" android:targetSdkVersion="26" /> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme"> <!-- This name is resolved to com.example.myapp.MainActivity based on the namespace property in the build.gradle file --> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".DisplayMessageActivity" android:parentActivityName=".MainActivity" /> </application> </manifest> Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates. Last updated 2026-07-14 UTC. [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-07-14 UTC."],[],[]] X Follow @AndroidDev on X YouTube Check out Android Developers on YouTube LinkedIn Connect with the Android Developers community on LinkedIn More Android Android Android for Enterprise Security Source News Blog Podcasts Discover Gaming Machine Learning Health & Fitness Camera & Media Privacy 5G Android Devices Large screens Wear OS ChromeOS devices Android for cars Android TV Releases Android 17 Android 16 Android 15 Android 14 Android 13 Android 12 Android 11 Documentation and Downloads Android Studio guide Developers guides API reference Download Studio Android NDK Support Report platform bug Report documentation bug Google Play support Join research studies Android Chrome Firebase Google Cloud Platform All products Privacy License Brand guidelines Manage cookies Get news and tips by email Subscribe English Deutsch Español – América Latina Français Indonesia Italiano Polski Português – Brasil Tiếng Việt Türkçe Русский עברית العربيّة فارسی हिंदी বাংলা ภาษาไทย 中文 – 简体 中文 – 繁體 日本語 한국어