CINXE.COM
AAPT2 | Android Studio | Android Developers
<!doctype html> <html lang="en" dir="ltr"> <head> <meta name="google-signin-client-id" content="721724668570-nbkv1cfusk7kk4eni4pjvepaus73b13t.apps.googleusercontent.com"> <meta name="google-signin-scope" content="profile email https://www.googleapis.com/auth/developerprofiles https://www.googleapis.com/auth/developerprofiles.award"> <meta property="og:site_name" content="Android Developers"> <meta property="og:type" content="website"><meta name="theme-color" content="#34a853"><meta charset="utf-8"> <meta content="IE=Edge" http-equiv="X-UA-Compatible"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="manifest" href="/_pwa/android/manifest.json" crossorigin="use-credentials"> <link rel="preconnect" href="//www.gstatic.com" crossorigin> <link rel="preconnect" href="//fonts.gstatic.com" crossorigin> <link rel="preconnect" href="//fonts.googleapis.com" crossorigin> <link rel="preconnect" href="//apis.google.com" crossorigin> <link rel="preconnect" href="//www.google-analytics.com" crossorigin><link rel="stylesheet" href="//fonts.googleapis.com/css?family=Google+Sans:400,500,600,700|Google+Sans+Text:400,400italic,500,500italic,600,600italic,700,700italic|Roboto+Mono:400,500,700&display=swap"> <link rel="stylesheet" href="//fonts.googleapis.com/css2?family=Material+Icons&family=Material+Symbols+Outlined&display=block"><link rel="stylesheet" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/css/app.css"> <link rel="stylesheet" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/css/dark-theme.css" disabled> <link rel="shortcut icon" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/favicon.svg"> <link rel="apple-touch-icon" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/touchicon-180.png"><link rel="canonical" href="https://developer.android.com/tools/aapt2"><link rel="search" type="application/opensearchdescription+xml" title="Android Developers" href="https://developer.android.com/s/opensearch.xml"> <link rel="alternate" hreflang="en" href="https://developer.android.com/tools/aapt2" /><link rel="alternate" hreflang="x-default" href="https://developer.android.com/tools/aapt2" /><link rel="alternate" hreflang="ar" href="https://developer.android.com/tools/aapt2?hl=ar" /><link rel="alternate" hreflang="bn" href="https://developer.android.com/tools/aapt2?hl=bn" /><link rel="alternate" hreflang="zh-Hans" href="https://developer.android.com/tools/aapt2?hl=zh-cn" /><link rel="alternate" hreflang="zh-Hant" href="https://developer.android.com/tools/aapt2?hl=zh-tw" /><link rel="alternate" hreflang="fa" href="https://developer.android.com/tools/aapt2?hl=fa" /><link rel="alternate" hreflang="fr" href="https://developer.android.com/tools/aapt2?hl=fr" /><link rel="alternate" hreflang="de" href="https://developer.android.com/tools/aapt2?hl=de" /><link rel="alternate" hreflang="he" href="https://developer.android.com/tools/aapt2?hl=he" /><link rel="alternate" hreflang="hi" href="https://developer.android.com/tools/aapt2?hl=hi" /><link rel="alternate" hreflang="id" href="https://developer.android.com/tools/aapt2?hl=id" /><link rel="alternate" hreflang="it" href="https://developer.android.com/tools/aapt2?hl=it" /><link rel="alternate" hreflang="ja" href="https://developer.android.com/tools/aapt2?hl=ja" /><link rel="alternate" hreflang="ko" href="https://developer.android.com/tools/aapt2?hl=ko" /><link rel="alternate" hreflang="pl" href="https://developer.android.com/tools/aapt2?hl=pl" /><link rel="alternate" hreflang="pt-BR" href="https://developer.android.com/tools/aapt2?hl=pt-br" /><link rel="alternate" hreflang="ru" href="https://developer.android.com/tools/aapt2?hl=ru" /><link rel="alternate" hreflang="es-419" href="https://developer.android.com/tools/aapt2?hl=es-419" /><link rel="alternate" hreflang="th" href="https://developer.android.com/tools/aapt2?hl=th" /><link rel="alternate" hreflang="tr" href="https://developer.android.com/tools/aapt2?hl=tr" /><link rel="alternate" hreflang="vi" href="https://developer.android.com/tools/aapt2?hl=vi" /><title>AAPT2 | Android Studio | Android Developers</title> <meta property="og:title" content="AAPT2 | Android Studio | Android Developers"><meta property="og:url" content="https://developer.android.com/tools/aapt2"><meta property="og:image" content="https://developer.android.com/static/images/social/android-developers.png"> <meta property="og:image:width" content="1200"> <meta property="og:image:height" content="675"><meta property="og:locale" content="en"><meta name="twitter:card" content="summary_large_image"><script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Article", "headline": "AAPT2" } </script><script type="application/ld+json"> { "@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [{ "@type": "ListItem", "position": 1, "name": "Android Studio", "item": "https://developer.android.com/studio" },{ "@type": "ListItem", "position": 2, "name": "AAPT2", "item": "https://developer.android.com/tools/aapt2" }] } </script> <link rel="stylesheet" href="/extras.css"></head> <body class="" template="page" theme="android-theme" type="article" appearance layout="docs" display-toc pending> <devsite-progress type="indeterminate" id="app-progress"></devsite-progress> <section class="devsite-wrapper"> <devsite-cookie-notification-bar></devsite-cookie-notification-bar><devsite-header role="banner"> <div class="devsite-header--inner nocontent"> <div class="devsite-top-logo-row-wrapper-wrapper"> <div class="devsite-top-logo-row-wrapper"> <div class="devsite-top-logo-row"> <button type="button" id="devsite-hamburger-menu" class="devsite-header-icon-button button-flat material-icons gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Navigation menu button" visually-hidden aria-label="Open menu"> </button> <div class="devsite-product-name-wrapper"> <a href="/" class="devsite-site-logo-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Site logo" track-type="globalNav" track-name="androidDevelopers" track-metadata-position="nav" track-metadata-eventDetail="nav"> <picture> <source srcset="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/lockup-dark-theme.svg" media="(prefers-color-scheme: dark)" class="devsite-dark-theme" alt="Android Developers"> <img src="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/lockup.svg" class="devsite-site-logo" alt="Android Developers"> </picture> </a> <span class="devsite-product-name"> <ul class="devsite-breadcrumb-list" > <li class="devsite-breadcrumb-item "> </li> </ul> </span> </div> <div class="devsite-top-logo-row-middle"> <div class="devsite-header-upper-tabs"> <devsite-tabs class="upper-tabs"> <nav class="devsite-tabs-wrapper" aria-label="Upper tabs"> <tab class="devsite-dropdown devsite-dropdown-full "> <a href="https://developer.android.com/get-started" track-metadata-eventdetail="https://developer.android.com/get-started" class="devsite-tabs-content gc-analytics-event android-dropdown-tab" track-type="nav" track-metadata-position="nav - essentials" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Essentials" track-name="essentials" > Essentials </a> <a href="#" role="button" aria-haspopup="true" aria-expanded="false" aria-label="Dropdown menu for Essentials" track-type="nav" track-metadata-eventdetail="https://developer.android.com/get-started" track-metadata-position="nav - essentials" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Essentials" track-name="essentials" class="devsite-tabs-dropdown-toggle devsite-icon devsite-icon-arrow-drop-down"></a> <div class="devsite-tabs-dropdown" aria-label="submenu" hidden> <div class="devsite-tabs-dropdown-content"> <div class="devsite-tabs-dropdown-column android-dropdown android-dropdown-primary android-dropdown-studio"> <ul class="devsite-tabs-dropdown-section "> <li class="devsite-nav-title" role="heading" tooltip>Gemini in Android Studio</li> <li class="devsite-nav-description">Your AI development companion for Android development. </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/gemini-in-android" track-type="nav" track-metadata-eventdetail="https://developer.android.com/gemini-in-android" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="gemini in android studio" tooltip class="button button-primary" > <div class="devsite-nav-item-title"> Learn more </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/studio" track-type="nav" track-metadata-eventdetail="https://developer.android.com/studio" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="gemini in android studio" tooltip class="button button-white" > <div class="devsite-nav-item-title"> Get Android Studio </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-launch"> <li class="devsite-nav-title" role="heading" tooltip>Get started</li> <li class="devsite-nav-description">Start by creating your first app. Go deeper with our training courses or explore app development on your own. </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/get-started/overview" track-type="nav" track-metadata-eventdetail="https://developer.android.com/get-started/overview" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get started" tooltip > <div class="devsite-nav-item-title"> Hello world </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/courses" track-type="nav" track-metadata-eventdetail="https://developer.android.com/courses" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get started" tooltip > <div class="devsite-nav-item-title"> Training courses </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/get-started/codelabs" track-type="nav" track-metadata-eventdetail="https://developer.android.com/get-started/codelabs" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get started" tooltip > <div class="devsite-nav-item-title"> Tutorials </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/kotlin" track-type="nav" track-metadata-eventdetail="https://developer.android.com/kotlin" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get started" tooltip > <div class="devsite-nav-item-title"> Kotlin for Android </div> </a> </li> <li class="devsite-nav-item"> <a href="https://play.google.com/console/about/guides/monetize/" track-type="nav" track-metadata-eventdetail="https://play.google.com/console/about/guides/monetize/" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get started" tooltip > <div class="devsite-nav-item-title"> Monetization with Play ↗️ </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-multiple-screens"> <li class="devsite-nav-title" role="heading" tooltip>Extend by device</li> <li class="devsite-nav-description">Build apps that give your users seamless experiences from phones to tablets, watches, and more. </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/adaptive-apps" track-type="nav" track-metadata-eventdetail="https://developer.android.com/adaptive-apps" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="extend by device" tooltip > <div class="devsite-nav-item-title"> Adaptive apps </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/wear" track-type="nav" track-metadata-eventdetail="https://developer.android.com/wear" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="extend by device" tooltip > <div class="devsite-nav-item-title"> Wear OS </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/cars" track-type="nav" track-metadata-eventdetail="https://developer.android.com/cars" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="extend by device" tooltip > <div class="devsite-nav-item-title"> Android for Cars </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/tv" track-type="nav" track-metadata-eventdetail="https://developer.android.com/tv" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="extend by device" tooltip > <div class="devsite-nav-item-title"> Android TV </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/chrome-os" track-type="nav" track-metadata-eventdetail="https://developer.android.com/chrome-os" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="extend by device" tooltip > <div class="devsite-nav-item-title"> ChromeOS </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/multi-device-development" track-type="nav" track-metadata-eventdetail="https://developer.android.com/multi-device-development" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="extend by device" tooltip > <div class="devsite-nav-item-title"> Cross-device SDK </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-platform"> <li class="devsite-nav-title" role="heading" tooltip>Build by category</li> <li class="devsite-nav-description">Learn to build for your use case by following Google's prescriptive and opinionated guidance. </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/games" track-type="nav" track-metadata-eventdetail="https://developer.android.com/games" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="build by category" tooltip > <div class="devsite-nav-item-title"> Games </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/media" track-type="nav" track-metadata-eventdetail="https://developer.android.com/media" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="build by category" tooltip > <div class="devsite-nav-item-title"> Camera & Media </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/social-and-messaging" track-type="nav" track-metadata-eventdetail="https://developer.android.com/social-and-messaging" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="build by category" tooltip > <div class="devsite-nav-item-title"> Social & messaging </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/health-and-fitness" track-type="nav" track-metadata-eventdetail="https://developer.android.com/health-and-fitness" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="build by category" tooltip > <div class="devsite-nav-item-title"> Health & Fitness </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/productivity" track-type="nav" track-metadata-eventdetail="https://developer.android.com/productivity" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="build by category" tooltip > <div class="devsite-nav-item-title"> Productivity </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/work/overview" track-type="nav" track-metadata-eventdetail="https://developer.android.com/work/overview" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="build by category" tooltip > <div class="devsite-nav-item-title"> Enterprise apps </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-stars"> <li class="devsite-nav-title" role="heading" tooltip>Get the latest</li> <li class="devsite-nav-description">Stay in touch with the latest releases throughout the year, join our preview programs, and give us your feedback. </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/latest-updates" track-type="nav" track-metadata-eventdetail="https://developer.android.com/latest-updates" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get the latest" tooltip > <div class="devsite-nav-item-title"> Latest updates </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/latest-updates/experimental" track-type="nav" track-metadata-eventdetail="https://developer.android.com/latest-updates/experimental" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get the latest" tooltip > <div class="devsite-nav-item-title"> Experimental updates </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/studio/preview" track-type="nav" track-metadata-eventdetail="https://developer.android.com/studio/preview" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get the latest" tooltip > <div class="devsite-nav-item-title"> Android Studio preview </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/jetpack/androidx/versions" track-type="nav" track-metadata-eventdetail="https://developer.android.com/jetpack/androidx/versions" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get the latest" tooltip > <div class="devsite-nav-item-title"> Jetpack & Compose libraries </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/training/wearables/versions/4" track-type="nav" track-metadata-eventdetail="https://developer.android.com/training/wearables/versions/4" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get the latest" tooltip > <div class="devsite-nav-item-title"> Wear OS preview </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/design-for-safety/privacy-sandbox" track-type="nav" track-metadata-eventdetail="https://developer.android.com/design-for-safety/privacy-sandbox" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get the latest" tooltip > <div class="devsite-nav-item-title"> Privacy Sandbox </div> </a> </li> </ul> </div> </div> </div> </tab> <tab class="devsite-dropdown devsite-dropdown-full "> <a href="https://developer.android.com/design" track-metadata-eventdetail="https://developer.android.com/design" class="devsite-tabs-content gc-analytics-event android-dropdown-tab" track-type="nav" track-metadata-position="nav - design & plan" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Design & Plan" track-name="design & plan" > Design & Plan </a> <a href="#" role="button" aria-haspopup="true" aria-expanded="false" aria-label="Dropdown menu for Design & Plan" track-type="nav" track-metadata-eventdetail="https://developer.android.com/design" track-metadata-position="nav - design & plan" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Design & Plan" track-name="design & plan" class="devsite-tabs-dropdown-toggle devsite-icon devsite-icon-arrow-drop-down"></a> <div class="devsite-tabs-dropdown" aria-label="submenu" hidden> <div class="devsite-tabs-dropdown-content"> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-layout"> <li class="devsite-nav-title" role="heading" tooltip>UI Design</li> <li class="devsite-nav-description">Design a beautiful user interface using Android best practices.</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/design/ui" track-type="nav" track-metadata-eventdetail="https://developer.android.com/design/ui" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="ui design" tooltip > <div class="devsite-nav-item-title"> Design for Android </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/design/ui/mobile" track-type="nav" track-metadata-eventdetail="https://developer.android.com/design/ui/mobile" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="ui design" tooltip > <div class="devsite-nav-item-title"> Mobile </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/design/ui/large-screens" track-type="nav" track-metadata-eventdetail="https://developer.android.com/design/ui/large-screens" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="ui design" tooltip > <div class="devsite-nav-item-title"> Large screens (e.g., tablets) </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/design/ui/widget" track-type="nav" track-metadata-eventdetail="https://developer.android.com/design/ui/widget" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="ui design" tooltip > <div class="devsite-nav-item-title"> Widgets </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/design/ui/wear" track-type="nav" track-metadata-eventdetail="https://developer.android.com/design/ui/wear" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="ui design" tooltip > <div class="devsite-nav-item-title"> Wear OS </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/design/ui/tv" track-type="nav" track-metadata-eventdetail="https://developer.android.com/design/ui/tv" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="ui design" tooltip > <div class="devsite-nav-item-title"> Android TV </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-design"> <li class="devsite-nav-title" role="heading" tooltip>Architecture</li> <li class="devsite-nav-description">Design robust, testable, and maintainable app logic and services.</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/topic/architecture/intro" track-type="nav" track-metadata-eventdetail="https://developer.android.com/topic/architecture/intro" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="architecture" tooltip > <div class="devsite-nav-item-title"> Introduction </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/topic/libraries/view-binding" track-type="nav" track-metadata-eventdetail="https://developer.android.com/topic/libraries/view-binding" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="architecture" tooltip > <div class="devsite-nav-item-title"> Libraries </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/guide/navigation/navigation-principles" track-type="nav" track-metadata-eventdetail="https://developer.android.com/guide/navigation/navigation-principles" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="architecture" tooltip > <div class="devsite-nav-item-title"> Navigation </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/topic/modularization" track-type="nav" track-metadata-eventdetail="https://developer.android.com/topic/modularization" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="architecture" tooltip > <div class="devsite-nav-item-title"> Modularization </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/training/testing/fundamentals" track-type="nav" track-metadata-eventdetail="https://developer.android.com/training/testing/fundamentals" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="architecture" tooltip > <div class="devsite-nav-item-title"> Testing </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-vitals"> <li class="devsite-nav-title" role="heading" tooltip>Quality</li> <li class="devsite-nav-description">Plan for app quality and align with Play store guidelines.</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/quality" track-type="nav" track-metadata-eventdetail="https://developer.android.com/quality" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="quality" tooltip > <div class="devsite-nav-item-title"> Overview </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/quality/core-value" track-type="nav" track-metadata-eventdetail="https://developer.android.com/quality/core-value" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="quality" tooltip > <div class="devsite-nav-item-title"> Core value </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/quality/user-experience" track-type="nav" track-metadata-eventdetail="https://developer.android.com/quality/user-experience" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="quality" tooltip > <div class="devsite-nav-item-title"> User experience </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/quality/technical" track-type="nav" track-metadata-eventdetail="https://developer.android.com/quality/technical" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="quality" tooltip > <div class="devsite-nav-item-title"> Technical quality </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/quality/privacy-and-security" track-type="nav" track-metadata-eventdetail="https://developer.android.com/quality/privacy-and-security" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="quality" tooltip > <div class="devsite-nav-item-title"> Security </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-security-2"> <li class="devsite-nav-title" role="heading" tooltip>Security</li> <li class="devsite-nav-description">Safeguard users against threats and ensure a secure Android experience.</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/security" track-type="nav" track-metadata-eventdetail="https://developer.android.com/security" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="security" tooltip > <div class="devsite-nav-item-title"> Overview </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/privacy-and-security/about" track-type="nav" track-metadata-eventdetail="https://developer.android.com/privacy-and-security/about" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="security" tooltip > <div class="devsite-nav-item-title"> Privacy </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/identity" track-type="nav" track-metadata-eventdetail="https://developer.android.com/identity" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="security" tooltip > <div class="devsite-nav-item-title"> Identity </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/security/fraud-prevention" track-type="nav" track-metadata-eventdetail="https://developer.android.com/security/fraud-prevention" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="security" tooltip > <div class="devsite-nav-item-title"> Fraud prevention </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-earth"> <li class="devsite-nav-title" role="heading" tooltip>Build for Billions</li> <li class="devsite-nav-description">Create the best experience for entry-level devices</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/build-for-billions" track-type="nav" track-metadata-eventdetail="https://developer.android.com/build-for-billions" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="build for billions" tooltip > <div class="devsite-nav-item-title"> Overview </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/docs/quality-guidelines/build-for-billions" track-type="nav" track-metadata-eventdetail="https://developer.android.com/docs/quality-guidelines/build-for-billions" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="build for billions" tooltip > <div class="devsite-nav-item-title"> About new markets </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/guide/topics/androidgo" track-type="nav" track-metadata-eventdetail="https://developer.android.com/guide/topics/androidgo" track-metadata-position="nav - design & plan" track-metadata-module="tertiary nav" track-metadata-module_headline="build for billions" tooltip > <div class="devsite-nav-item-title"> Android (Go edition) </div> </a> </li> </ul> </div> </div> </div> </tab> <tab class="devsite-dropdown devsite-dropdown-full devsite-active "> <a href="https://developer.android.com/develop" track-metadata-eventdetail="https://developer.android.com/develop" class="devsite-tabs-content gc-analytics-event android-dropdown-tab" track-type="nav" track-metadata-position="nav - develop" track-metadata-module="primary nav" aria-label="Develop, selected" data-category="Site-Wide Custom Events" data-label="Tab: Develop" track-name="develop" > Develop </a> <a href="#" role="button" aria-haspopup="true" aria-expanded="false" aria-label="Dropdown menu for Develop" track-type="nav" track-metadata-eventdetail="https://developer.android.com/develop" track-metadata-position="nav - develop" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Develop" track-name="develop" class="devsite-tabs-dropdown-toggle devsite-icon devsite-icon-arrow-drop-down"></a> <div class="devsite-tabs-dropdown" aria-label="submenu" hidden> <div class="devsite-tabs-dropdown-content"> <div class="devsite-tabs-dropdown-column android-dropdown android-dropdown-primary android-dropdown-ai"> <ul class="devsite-tabs-dropdown-section "> <li class="devsite-nav-title" role="heading" tooltip>Build AI experiences</li> <li class="devsite-nav-description">Build AI-powered Android apps with Gemini APIs and more. </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/ai" track-type="nav" track-metadata-eventdetail="https://developer.android.com/ai" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="build ai experiences" tooltip class="button button-primary" > <div class="devsite-nav-item-title"> Get started </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-flag"> <li class="devsite-nav-title" role="heading" tooltip>Core areas</li> <li class="devsite-nav-description">Get the samples and docs for the features you need.</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/samples" track-type="nav" track-metadata-eventdetail="https://developer.android.com/samples" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="core areas" tooltip > <div class="devsite-nav-item-title"> Samples </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/quick-guides" track-type="nav" track-metadata-eventdetail="https://developer.android.com/quick-guides" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="core areas" tooltip > <div class="devsite-nav-item-title"> Try Quick Guidesᵇᵉᵗᵃ </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/develop/ui" track-type="nav" track-metadata-eventdetail="https://developer.android.com/develop/ui" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="core areas" tooltip > <div class="devsite-nav-item-title"> User interfaces </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/guide/topics/permissions/overview" track-type="nav" track-metadata-eventdetail="https://developer.android.com/guide/topics/permissions/overview" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="core areas" tooltip > <div class="devsite-nav-item-title"> Permissions </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/develop/background-work" track-type="nav" track-metadata-eventdetail="https://developer.android.com/develop/background-work" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="core areas" tooltip > <div class="devsite-nav-item-title"> Background work </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/guide/topics/data" track-type="nav" track-metadata-eventdetail="https://developer.android.com/guide/topics/data" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="core areas" tooltip > <div class="devsite-nav-item-title"> Data and files </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/develop#core-areas" track-type="nav" track-metadata-eventdetail="https://developer.android.com/develop#core-areas" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="core areas" tooltip > <div class="devsite-nav-item-title"> All core areas ⤵️ </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-tools-2"> <li class="devsite-nav-title" role="heading" tooltip>Tools and workflow</li> <li class="devsite-nav-description">Use the IDE to write and build your app, or create your own pipeline.</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/studio/write" track-type="nav" track-metadata-eventdetail="https://developer.android.com/studio/write" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="tools and workflow" tooltip > <div class="devsite-nav-item-title"> Write and debug code </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/build/gradle-build-overview" track-type="nav" track-metadata-eventdetail="https://developer.android.com/build/gradle-build-overview" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="tools and workflow" tooltip > <div class="devsite-nav-item-title"> Build projects </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/training/testing" track-type="nav" track-metadata-eventdetail="https://developer.android.com/training/testing" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="tools and workflow" tooltip > <div class="devsite-nav-item-title"> Test your app </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/topic/performance/overview" track-type="nav" track-metadata-eventdetail="https://developer.android.com/topic/performance/overview" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="tools and workflow" tooltip > <div class="devsite-nav-item-title"> Performance </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/tools" track-type="nav" track-metadata-eventdetail="https://developer.android.com/tools" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="tools and workflow" tooltip > <div class="devsite-nav-item-title"> Command-line tools </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/reference/tools/gradle-api" track-type="nav" track-metadata-eventdetail="https://developer.android.com/reference/tools/gradle-api" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="tools and workflow" tooltip > <div class="devsite-nav-item-title"> Gradle plugin API </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-multiple-screens"> <li class="devsite-nav-title" role="heading" tooltip>Device tech</li> <li class="devsite-nav-description">Write code for form factors. Connect devices and share data.</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/guide/topics/large-screens/get-started-with-large-screens" track-type="nav" track-metadata-eventdetail="https://developer.android.com/guide/topics/large-screens/get-started-with-large-screens" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="device tech" tooltip > <div class="devsite-nav-item-title"> Large screens (e.g., tablets) </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/training/wearables" track-type="nav" track-metadata-eventdetail="https://developer.android.com/training/wearables" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="device tech" tooltip > <div class="devsite-nav-item-title"> Wear OS </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/health-and-fitness/guides" track-type="nav" track-metadata-eventdetail="https://developer.android.com/health-and-fitness/guides" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="device tech" tooltip > <div class="devsite-nav-item-title"> Android Health </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/guide/topics/connectivity/cross-device-sdk/overview" track-type="nav" track-metadata-eventdetail="https://developer.android.com/guide/topics/connectivity/cross-device-sdk/overview" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="device tech" tooltip > <div class="devsite-nav-item-title"> Cross-device SDK </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/training/cars" track-type="nav" track-metadata-eventdetail="https://developer.android.com/training/cars" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="device tech" tooltip > <div class="devsite-nav-item-title"> Android for Cars </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/training/tv" track-type="nav" track-metadata-eventdetail="https://developer.android.com/training/tv" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="device tech" tooltip > <div class="devsite-nav-item-title"> Android TV </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/chrome-os/intro" track-type="nav" track-metadata-eventdetail="https://developer.android.com/chrome-os/intro" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="device tech" tooltip > <div class="devsite-nav-item-title"> ChromeOS </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-core-library"> <li class="devsite-nav-title" role="heading" tooltip>Libraries</li> <li class="devsite-nav-description">Browse API reference documentation with all the details.</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/reference/packages" track-type="nav" track-metadata-eventdetail="https://developer.android.com/reference/packages" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="libraries" tooltip > <div class="devsite-nav-item-title"> Android platform </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/jetpack/androidx/explorer" track-type="nav" track-metadata-eventdetail="https://developer.android.com/jetpack/androidx/explorer" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="libraries" tooltip > <div class="devsite-nav-item-title"> Jetpack libraries </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/jetpack/androidx/releases/compose" track-type="nav" track-metadata-eventdetail="https://developer.android.com/jetpack/androidx/releases/compose" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="libraries" tooltip > <div class="devsite-nav-item-title"> Compose libraries </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/android/reference/packages" track-type="nav" track-metadata-eventdetail="https://developers.google.com/android/reference/packages" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="libraries" tooltip > <div class="devsite-nav-item-title"> Google Play services ↗️ </div> </a> </li> <li class="devsite-nav-item"> <a href="https://play.google.com/sdks" track-type="nav" track-metadata-eventdetail="https://play.google.com/sdks" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="libraries" tooltip > <div class="devsite-nav-item-title"> Google Play SDK index ↗️ </div> </a> </li> </ul> </div> </div> </div> </tab> <tab > <a href="https://developer.android.com/distribute" track-metadata-eventdetail="https://developer.android.com/distribute" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - google play" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Google Play" track-name="google play" > Google Play </a> </tab> <tab > <a href="https://developer.android.com/community" track-metadata-eventdetail="https://developer.android.com/community" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - community" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Community" track-name="community" > Community </a> </tab> </nav> </devsite-tabs> </div> <devsite-search enable-signin enable-search enable-suggestions enable-query-completion project-name="Android Studio" tenant-name="Android Developers" > <form class="devsite-search-form" action="https://developer.android.com/s/results" method="GET"> <div class="devsite-search-container"> <button type="button" search-open class="devsite-search-button devsite-header-icon-button button-flat material-icons" aria-label="Open search"></button> <div class="devsite-searchbox"> <input aria-activedescendant="" aria-autocomplete="list" aria-label="Search" aria-expanded="false" aria-haspopup="listbox" autocomplete="off" class="devsite-search-field devsite-search-query" name="q" placeholder="Search" role="combobox" type="text" value="" > <div class="devsite-search-image material-icons" aria-hidden="true"> </div> <div class="devsite-search-shortcut-icon-container" aria-hidden="true"> <kbd class="devsite-search-shortcut-icon">/</kbd> </div> </div> </div> </form> <button type="button" search-close class="devsite-search-button devsite-header-icon-button button-flat material-icons" aria-label="Close search"></button> </devsite-search> </div> <devsite-appearance-selector></devsite-appearance-selector> <devsite-language-selector> <ul role="presentation"> <li role="presentation"> <a role="menuitem" lang="en" >English</a> </li> <li role="presentation"> <a role="menuitem" lang="de" >Deutsch</a> </li> <li role="presentation"> <a role="menuitem" lang="es_419" >Español – América Latina</a> </li> <li role="presentation"> <a role="menuitem" lang="fr" >Français</a> </li> <li role="presentation"> <a role="menuitem" lang="id" >Indonesia</a> </li> <li role="presentation"> <a role="menuitem" lang="it" >Italiano</a> </li> <li role="presentation"> <a role="menuitem" lang="pl" >Polski</a> </li> <li role="presentation"> <a role="menuitem" lang="pt_br" >Português – Brasil</a> </li> <li role="presentation"> <a role="menuitem" lang="vi" >Tiếng Việt</a> </li> <li role="presentation"> <a role="menuitem" lang="tr" >Türkçe</a> </li> <li role="presentation"> <a role="menuitem" lang="ru" >Русский</a> </li> <li role="presentation"> <a role="menuitem" lang="he" >עברית</a> </li> <li role="presentation"> <a role="menuitem" lang="ar" >العربيّة</a> </li> <li role="presentation"> <a role="menuitem" lang="fa" >فارسی</a> </li> <li role="presentation"> <a role="menuitem" lang="hi" >हिंदी</a> </li> <li role="presentation"> <a role="menuitem" lang="bn" >বাংলা</a> </li> <li role="presentation"> <a role="menuitem" lang="th" >ภาษาไทย</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_cn" >中文 – 简体</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_tw" >中文 – 繁體</a> </li> <li role="presentation"> <a role="menuitem" lang="ja" >日本語</a> </li> <li role="presentation"> <a role="menuitem" lang="ko" >한국어</a> </li> </ul> </devsite-language-selector> <a class="devsite-header-link devsite-top-button button gc-analytics-event" href="https://developer.android.com/studio" data-category="Site-Wide Custom Events" data-label="Site header link" > Android Studio </a> <devsite-user enable-profiles id="devsite-user"> <span class="button devsite-top-button" aria-hidden="true" visually-hidden>Sign in</span> </devsite-user> </div> </div> </div> <div class="devsite-collapsible-section "> <div class="devsite-header-background"> <div class="devsite-product-id-row" > <div class="devsite-product-description-row"> <ul class="devsite-breadcrumb-list" > <li class="devsite-breadcrumb-item "> <a href="https://developer.android.com/studio" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Lower Header" data-value="1" track-type="globalNav" track-name="breadcrumb" track-metadata-position="1" track-metadata-eventdetail="Android Studio" > Android Studio </a> </li> </ul> </div> </div> <div class="devsite-doc-set-nav-row"> <devsite-tabs class="lower-tabs"> <nav class="devsite-tabs-wrapper" aria-label="Lower tabs"> <tab > <a href="https://developer.android.com/studio" track-metadata-eventdetail="https://developer.android.com/studio" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - download" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Download" track-name="download" > Download </a> </tab> <tab > <a href="https://developer.android.com/studio/intro" track-metadata-eventdetail="https://developer.android.com/studio/intro" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - android studio editor" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Android Studio editor" track-name="android studio editor" > Android Studio editor </a> </tab> <tab > <a href="https://developer.android.com/gemini-in-android" track-metadata-eventdetail="https://developer.android.com/gemini-in-android" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - gemini in android studio" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Gemini in Android Studio" track-name="gemini in android studio" > Gemini in Android Studio </a> </tab> <tab > <a href="https://developer.android.com/build/gradle-build-overview" track-metadata-eventdetail="https://developer.android.com/build/gradle-build-overview" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - android gradle plugin" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Android Gradle Plugin" track-name="android gradle plugin" > Android Gradle Plugin </a> </tab> <tab class="devsite-active"> <a href="https://developer.android.com/tools" track-metadata-eventdetail="https://developer.android.com/tools" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - sdk tools" track-metadata-module="primary nav" aria-label="SDK tools, selected" data-category="Site-Wide Custom Events" data-label="Tab: SDK tools" track-name="sdk tools" > SDK tools </a> </tab> <tab > <a href="https://developer.android.com/studio/preview" track-metadata-eventdetail="https://developer.android.com/studio/preview" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - preview" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Preview" track-name="preview" > Preview </a> </tab> </nav> </devsite-tabs> </div> </div> </div> </div> </devsite-header> <devsite-book-nav scrollbars > <div class="devsite-book-nav-filter" > <span class="filter-list-icon material-icons" aria-hidden="true"></span> <input type="text" placeholder="Filter" aria-label="Type to filter" role="searchbox"> <span class="filter-clear-button hidden" data-title="Clear filter" aria-label="Clear filter" role="button" tabindex="0"></span> </div> <nav class="devsite-book-nav devsite-nav nocontent" aria-label="Side menu"> <div class="devsite-mobile-header"> <button type="button" id="devsite-close-nav" class="devsite-header-icon-button button-flat material-icons gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Close navigation" aria-label="Close navigation"> </button> <div class="devsite-product-name-wrapper"> <a href="/" class="devsite-site-logo-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Site logo" track-type="globalNav" track-name="androidDevelopers" track-metadata-position="nav" track-metadata-eventDetail="nav"> <picture> <source srcset="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/lockup-dark-theme.svg" media="(prefers-color-scheme: dark)" class="devsite-dark-theme" alt="Android Developers"> <img src="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/lockup.svg" class="devsite-site-logo" alt="Android Developers"> </picture> </a> <span class="devsite-product-name"> <ul class="devsite-breadcrumb-list" > <li class="devsite-breadcrumb-item "> </li> </ul> </span> </div> </div> <div class="devsite-book-nav-wrapper"> <div class="devsite-mobile-nav-top"> <ul class="devsite-nav-list"> <li class="devsite-nav-item"> <a href="/get-started" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Essentials" track-name="essentials" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Essentials" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Essentials </span> </a> <ul class="devsite-nav-responsive-tabs devsite-nav-has-menu "> <li class="devsite-nav-item"> <span class="devsite-nav-title" tooltip data-category="Site-Wide Custom Events" data-label="Tab: Essentials" track-name="essentials" > <span class="devsite-nav-text" tooltip menu="Essentials"> More </span> <span class="devsite-nav-icon material-icons" data-icon="forward" menu="Essentials"> </span> </span> </li> </ul> </li> <li class="devsite-nav-item"> <a href="/design" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Design & Plan" track-name="design & plan" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Design & Plan" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Design & Plan </span> </a> <ul class="devsite-nav-responsive-tabs devsite-nav-has-menu "> <li class="devsite-nav-item"> <span class="devsite-nav-title" tooltip data-category="Site-Wide Custom Events" data-label="Tab: Design & Plan" track-name="design & plan" > <span class="devsite-nav-text" tooltip menu="Design & Plan"> More </span> <span class="devsite-nav-icon material-icons" data-icon="forward" menu="Design & Plan"> </span> </span> </li> </ul> </li> <li class="devsite-nav-item"> <a href="/develop" class="devsite-nav-title gc-analytics-event devsite-nav-active" data-category="Site-Wide Custom Events" data-label="Tab: Develop" track-name="develop" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Develop" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Develop </span> </a> <ul class="devsite-nav-responsive-tabs devsite-nav-has-menu "> <li class="devsite-nav-item"> <span class="devsite-nav-title" tooltip data-category="Site-Wide Custom Events" data-label="Tab: Develop" track-name="develop" > <span class="devsite-nav-text" tooltip menu="Develop"> More </span> <span class="devsite-nav-icon material-icons" data-icon="forward" menu="Develop"> </span> </span> </li> </ul> <ul class="devsite-nav-responsive-tabs"> <li class="devsite-nav-item"> <a href="/studio" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Download" track-name="download" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Download" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Download </span> </a> </li> <li class="devsite-nav-item"> <a href="/studio/intro" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Tab: Android Studio editor" track-name="android studio editor" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android Studio editor" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android Studio editor </span> <span class="devsite-nav-icon material-icons" data-icon="forward" > </span> </a> </li> <li class="devsite-nav-item"> <a href="/gemini-in-android" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Gemini in Android Studio" track-name="gemini in android studio" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Gemini in Android Studio" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Gemini in Android Studio </span> </a> </li> <li class="devsite-nav-item"> <a href="/build/gradle-build-overview" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Tab: Android Gradle Plugin" track-name="android gradle plugin" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android Gradle Plugin" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android Gradle Plugin </span> <span class="devsite-nav-icon material-icons" data-icon="forward" > </span> </a> </li> <li class="devsite-nav-item"> <a href="/tools" class="devsite-nav-title gc-analytics-event devsite-nav-has-children devsite-nav-active" data-category="Site-Wide Custom Events" data-label="Tab: SDK tools" track-name="sdk tools" data-category="Site-Wide Custom Events" data-label="Responsive Tab: SDK tools" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip menu="_book"> SDK tools </span> <span class="devsite-nav-icon material-icons" data-icon="forward" menu="_book"> </span> </a> </li> <li class="devsite-nav-item"> <a href="/studio/preview" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Tab: Preview" track-name="preview" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Preview" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Preview </span> <span class="devsite-nav-icon material-icons" data-icon="forward" > </span> </a> </li> </ul> </li> <li class="devsite-nav-item"> <a href="/distribute" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Google Play" track-name="google play" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Google Play" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Google Play </span> </a> </li> <li class="devsite-nav-item"> <a href="/community" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Community" track-name="community" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Community" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Community </span> </a> </li> <li class="devsite-nav-item"> <a href="/studio" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android Studio" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android Studio </span> </a> </li> </ul> </div> <div class="devsite-mobile-nav-bottom"> <ul class="devsite-nav-list" menu="_book"> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>What's new in SDK Tools</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/tools/releases/build-tools" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /tools/releases/build-tools" track-type="bookNav" track-name="click" track-metadata-eventdetail="/tools/releases/build-tools" ><span class="devsite-nav-text" tooltip>SDK build tools release notes</span></a></li><li class="devsite-nav-item"><a href="/tools/releases/cmdline-tools" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /tools/releases/cmdline-tools" track-type="bookNav" track-name="click" track-metadata-eventdetail="/tools/releases/cmdline-tools" ><span class="devsite-nav-text" tooltip>SDK command line tools release notes</span></a></li><li class="devsite-nav-item"><a href="/tools/releases/platforms" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /tools/releases/platforms" track-type="bookNav" track-name="click" track-metadata-eventdetail="/tools/releases/platforms" ><span class="devsite-nav-text" tooltip>SDK platform release notes</span></a></li><li class="devsite-nav-item"><a href="/tools/releases/platform-tools" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /tools/releases/platform-tools" track-type="bookNav" track-name="click" track-metadata-eventdetail="/tools/releases/platform-tools" ><span class="devsite-nav-text" tooltip>SDK platform tools release notes</span></a></li></ul></div></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>Command line tools</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/tools" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /tools" track-type="bookNav" track-name="click" track-metadata-eventdetail="/tools" ><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/tools/aapt2" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /tools/aapt2" track-type="bookNav" track-name="click" track-metadata-eventdetail="/tools/aapt2" ><span class="devsite-nav-text" tooltip>aapt2</span></a></li><li class="devsite-nav-item"><a href="/tools/adb" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /tools/adb" track-type="bookNav" track-name="click" track-metadata-eventdetail="/tools/adb" ><span class="devsite-nav-text" tooltip>adb</span></a></li><li class="devsite-nav-item"><a href="/tools/apkanalyzer" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /tools/apkanalyzer" track-type="bookNav" track-name="click" track-metadata-eventdetail="/tools/apkanalyzer" ><span class="devsite-nav-text" tooltip>apkanalyzer</span></a></li><li class="devsite-nav-item"><a href="/tools/apksigner" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /tools/apksigner" track-type="bookNav" track-name="click" track-metadata-eventdetail="/tools/apksigner" ><span class="devsite-nav-text" tooltip>apksigner</span></a></li><li class="devsite-nav-item"><a href="/tools/avdmanager" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /tools/avdmanager" track-type="bookNav" track-name="click" track-metadata-eventdetail="/tools/avdmanager" ><span class="devsite-nav-text" tooltip>avdmanager</span></a></li><li class="devsite-nav-item"><a href="/tools/bmgr" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /tools/bmgr" track-type="bookNav" track-name="click" track-metadata-eventdetail="/tools/bmgr" ><span class="devsite-nav-text" tooltip>bmgr</span></a></li><li class="devsite-nav-item"><a href="/tools/bundletool" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /tools/bundletool" track-type="bookNav" track-name="click" track-metadata-eventdetail="/tools/bundletool" ><span class="devsite-nav-text" tooltip>bundletool</span></a></li><li class="devsite-nav-item"><a href="/tools/d8" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /tools/d8" track-type="bookNav" track-name="click" track-metadata-eventdetail="/tools/d8" ><span class="devsite-nav-text" tooltip>d8</span></a></li><li class="devsite-nav-item"><a href="/tools/dmtracedump" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /tools/dmtracedump" track-type="bookNav" track-name="click" track-metadata-eventdetail="/tools/dmtracedump" ><span class="devsite-nav-text" tooltip>dmtracedump</span></a></li><li class="devsite-nav-item"><a href="/tools/dumpsys" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /tools/dumpsys" track-type="bookNav" track-name="click" track-metadata-eventdetail="/tools/dumpsys" ><span class="devsite-nav-text" tooltip>dumpsys</span></a></li><li class="devsite-nav-item"><a href="/tools/etc1tool" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /tools/etc1tool" track-type="bookNav" track-name="click" track-metadata-eventdetail="/tools/etc1tool" ><span class="devsite-nav-text" tooltip>etc1tool</span></a></li><li class="devsite-nav-item"><a href="/tools/jobb" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /tools/jobb" track-type="bookNav" track-name="click" track-metadata-eventdetail="/tools/jobb" ><span class="devsite-nav-text" tooltip>jobb</span></a></li><li class="devsite-nav-item"><a href="/tools/jetifier" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /tools/jetifier" track-type="bookNav" track-name="click" track-metadata-eventdetail="/tools/jetifier" ><span class="devsite-nav-text" tooltip>jetifier-standalone</span></a></li><li class="devsite-nav-item"><a href="/tools/logcat" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /tools/logcat" track-type="bookNav" track-name="click" track-metadata-eventdetail="/tools/logcat" ><span class="devsite-nav-text" tooltip>logcat</span></a></li><li class="devsite-nav-item"><a href="/tools/mksdcard" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /tools/mksdcard" track-type="bookNav" track-name="click" track-metadata-eventdetail="/tools/mksdcard" ><span class="devsite-nav-text" tooltip>mksdcard</span></a></li><li class="devsite-nav-item"><a href="/tools/retrace" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /tools/retrace" track-type="bookNav" track-name="click" track-metadata-eventdetail="/tools/retrace" ><span class="devsite-nav-text" tooltip>retrace</span></a></li><li class="devsite-nav-item"><a href="/tools/sdkmanager" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /tools/sdkmanager" track-type="bookNav" track-name="click" track-metadata-eventdetail="/tools/sdkmanager" ><span class="devsite-nav-text" tooltip>sdkmanager</span></a></li><li class="devsite-nav-item"><a href="/tools/sqlite3" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /tools/sqlite3" track-type="bookNav" track-name="click" track-metadata-eventdetail="/tools/sqlite3" ><span class="devsite-nav-text" tooltip>sqlite3</span></a></li><li class="devsite-nav-item"><a href="/topic/performance/tracing/command-line" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /topic/performance/tracing/command-line" track-type="bookNav" track-name="click" track-metadata-eventdetail="/topic/performance/tracing/command-line" ><span class="devsite-nav-text" tooltip>systrace ⍈</span></a></li><li class="devsite-nav-item"><a href="/tools/perfetto" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /tools/perfetto" track-type="bookNav" track-name="click" track-metadata-eventdetail="/tools/perfetto" ><span class="devsite-nav-text" tooltip>perfetto</span></a></li><li class="devsite-nav-item"><a href="/tools/zipalign" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /tools/zipalign" track-type="bookNav" track-name="click" track-metadata-eventdetail="/tools/zipalign" ><span class="devsite-nav-text" tooltip>zipalign</span></a></li><li class="devsite-nav-item"><a href="/tools/variables" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /tools/variables" track-type="bookNav" track-name="click" track-metadata-eventdetail="/tools/variables" ><span class="devsite-nav-text" tooltip>Environment variables</span></a></li></ul></div></li> </ul> <ul class="devsite-nav-list" menu="Essentials" aria-label="Side menu" hidden> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Gemini in Android Studio </span> </span> </li> <li class="devsite-nav-item"> <a href="/gemini-in-android" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Learn more" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Learn more </span> </a> </li> <li class="devsite-nav-item"> <a href="/studio" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Get Android Studio" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Get Android Studio </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Get started </span> </span> </li> <li class="devsite-nav-item"> <a href="/get-started/overview" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Hello world" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Hello world </span> </a> </li> <li class="devsite-nav-item"> <a href="/courses" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Training courses" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Training courses </span> </a> </li> <li class="devsite-nav-item"> <a href="/get-started/codelabs" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Tutorials" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Tutorials </span> </a> </li> <li class="devsite-nav-item"> <a href="/kotlin" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Kotlin for Android" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Kotlin for Android </span> </a> </li> <li class="devsite-nav-item"> <a href="https://play.google.com/console/about/guides/monetize/" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Monetization with Play ↗️" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Monetization with Play ↗️ </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Extend by device </span> </span> </li> <li class="devsite-nav-item"> <a href="/adaptive-apps" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Adaptive apps" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Adaptive apps </span> </a> </li> <li class="devsite-nav-item"> <a href="/wear" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Wear OS" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Wear OS </span> </a> </li> <li class="devsite-nav-item"> <a href="/cars" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android for Cars" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android for Cars </span> </a> </li> <li class="devsite-nav-item"> <a href="/tv" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android TV" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android TV </span> </a> </li> <li class="devsite-nav-item"> <a href="/chrome-os" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: ChromeOS" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > ChromeOS </span> </a> </li> <li class="devsite-nav-item"> <a href="/multi-device-development" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Cross-device SDK" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Cross-device SDK </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Build by category </span> </span> </li> <li class="devsite-nav-item"> <a href="/games" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Games" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Games </span> </a> </li> <li class="devsite-nav-item"> <a href="/media" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Camera & Media" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Camera & Media </span> </a> </li> <li class="devsite-nav-item"> <a href="/social-and-messaging" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Social & messaging" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Social & messaging </span> </a> </li> <li class="devsite-nav-item"> <a href="/health-and-fitness" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Health & Fitness" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Health & Fitness </span> </a> </li> <li class="devsite-nav-item"> <a href="/productivity" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Productivity" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Productivity </span> </a> </li> <li class="devsite-nav-item"> <a href="/work/overview" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Enterprise apps" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Enterprise apps </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Get the latest </span> </span> </li> <li class="devsite-nav-item"> <a href="/latest-updates" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Latest updates" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Latest updates </span> </a> </li> <li class="devsite-nav-item"> <a href="/latest-updates/experimental" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Experimental updates" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Experimental updates </span> </a> </li> <li class="devsite-nav-item"> <a href="/studio/preview" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android Studio preview" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android Studio preview </span> </a> </li> <li class="devsite-nav-item"> <a href="/jetpack/androidx/versions" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Jetpack & Compose libraries" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Jetpack & Compose libraries </span> </a> </li> <li class="devsite-nav-item"> <a href="/training/wearables/versions/4" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Wear OS preview" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Wear OS preview </span> </a> </li> <li class="devsite-nav-item"> <a href="/design-for-safety/privacy-sandbox" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Privacy Sandbox" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Privacy Sandbox </span> </a> </li> </ul> <ul class="devsite-nav-list" menu="Design & Plan" aria-label="Side menu" hidden> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > UI Design </span> </span> </li> <li class="devsite-nav-item"> <a href="/design/ui" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Design for Android" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Design for Android </span> </a> </li> <li class="devsite-nav-item"> <a href="/design/ui/mobile" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Mobile" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Mobile </span> </a> </li> <li class="devsite-nav-item"> <a href="/design/ui/large-screens" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Large screens (e.g., tablets)" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Large screens (e.g., tablets) </span> </a> </li> <li class="devsite-nav-item"> <a href="/design/ui/widget" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Widgets" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Widgets </span> </a> </li> <li class="devsite-nav-item"> <a href="/design/ui/wear" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Wear OS" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Wear OS </span> </a> </li> <li class="devsite-nav-item"> <a href="/design/ui/tv" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android TV" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android TV </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Architecture </span> </span> </li> <li class="devsite-nav-item"> <a href="/topic/architecture/intro" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Introduction" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Introduction </span> </a> </li> <li class="devsite-nav-item"> <a href="/topic/libraries/view-binding" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Libraries" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Libraries </span> </a> </li> <li class="devsite-nav-item"> <a href="/guide/navigation/navigation-principles" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Navigation" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Navigation </span> </a> </li> <li class="devsite-nav-item"> <a href="/topic/modularization" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Modularization" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Modularization </span> </a> </li> <li class="devsite-nav-item"> <a href="/training/testing/fundamentals" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Testing" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Testing </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Quality </span> </span> </li> <li class="devsite-nav-item"> <a href="/quality" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Overview" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Overview </span> </a> </li> <li class="devsite-nav-item"> <a href="/quality/core-value" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Core value" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Core value </span> </a> </li> <li class="devsite-nav-item"> <a href="/quality/user-experience" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: User experience" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > User experience </span> </a> </li> <li class="devsite-nav-item"> <a href="/quality/technical" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Technical quality" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Technical quality </span> </a> </li> <li class="devsite-nav-item"> <a href="/quality/privacy-and-security" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Security" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Security </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Security </span> </span> </li> <li class="devsite-nav-item"> <a href="/security" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Overview" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Overview </span> </a> </li> <li class="devsite-nav-item"> <a href="/privacy-and-security/about" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Privacy" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Privacy </span> </a> </li> <li class="devsite-nav-item"> <a href="/identity" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Identity" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Identity </span> </a> </li> <li class="devsite-nav-item"> <a href="/security/fraud-prevention" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Fraud prevention" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Fraud prevention </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Build for Billions </span> </span> </li> <li class="devsite-nav-item"> <a href="/build-for-billions" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Overview" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Overview </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/quality-guidelines/build-for-billions" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: About new markets" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > About new markets </span> </a> </li> <li class="devsite-nav-item"> <a href="/guide/topics/androidgo" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android (Go edition)" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android (Go edition) </span> </a> </li> </ul> <ul class="devsite-nav-list" menu="Develop" aria-label="Side menu" hidden> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Build AI experiences </span> </span> </li> <li class="devsite-nav-item"> <a href="/ai" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Get started" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Get started </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Core areas </span> </span> </li> <li class="devsite-nav-item"> <a href="/samples" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Samples" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Samples </span> </a> </li> <li class="devsite-nav-item"> <a href="/quick-guides" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Try Quick Guidesᵇᵉᵗᵃ" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Try Quick Guidesᵇᵉᵗᵃ </span> </a> </li> <li class="devsite-nav-item"> <a href="/develop/ui" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: User interfaces" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > User interfaces </span> </a> </li> <li class="devsite-nav-item"> <a href="/guide/topics/permissions/overview" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Permissions" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Permissions </span> </a> </li> <li class="devsite-nav-item"> <a href="/develop/background-work" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Background work" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Background work </span> </a> </li> <li class="devsite-nav-item"> <a href="/guide/topics/data" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Data and files" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Data and files </span> </a> </li> <li class="devsite-nav-item"> <a href="/develop#core-areas" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: All core areas ⤵️" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > All core areas ⤵️ </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Tools and workflow </span> </span> </li> <li class="devsite-nav-item"> <a href="/studio/write" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Write and debug code" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Write and debug code </span> </a> </li> <li class="devsite-nav-item"> <a href="/build/gradle-build-overview" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Build projects" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Build projects </span> </a> </li> <li class="devsite-nav-item"> <a href="/training/testing" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Test your app" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Test your app </span> </a> </li> <li class="devsite-nav-item"> <a href="/topic/performance/overview" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Performance" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Performance </span> </a> </li> <li class="devsite-nav-item"> <a href="/tools" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Command-line tools" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Command-line tools </span> </a> </li> <li class="devsite-nav-item"> <a href="/reference/tools/gradle-api" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Gradle plugin API" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Gradle plugin API </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Device tech </span> </span> </li> <li class="devsite-nav-item"> <a href="/guide/topics/large-screens/get-started-with-large-screens" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Large screens (e.g., tablets)" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Large screens (e.g., tablets) </span> </a> </li> <li class="devsite-nav-item"> <a href="/training/wearables" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Wear OS" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Wear OS </span> </a> </li> <li class="devsite-nav-item"> <a href="/health-and-fitness/guides" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android Health" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android Health </span> </a> </li> <li class="devsite-nav-item"> <a href="/guide/topics/connectivity/cross-device-sdk/overview" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Cross-device SDK" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Cross-device SDK </span> </a> </li> <li class="devsite-nav-item"> <a href="/training/cars" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android for Cars" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android for Cars </span> </a> </li> <li class="devsite-nav-item"> <a href="/training/tv" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android TV" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android TV </span> </a> </li> <li class="devsite-nav-item"> <a href="/chrome-os/intro" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: ChromeOS" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > ChromeOS </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Libraries </span> </span> </li> <li class="devsite-nav-item"> <a href="/reference/packages" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android platform" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android platform </span> </a> </li> <li class="devsite-nav-item"> <a href="/jetpack/androidx/explorer" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Jetpack libraries" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Jetpack libraries </span> </a> </li> <li class="devsite-nav-item"> <a href="/jetpack/androidx/releases/compose" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Compose libraries" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Compose libraries </span> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/android/reference/packages" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Google Play services ↗️" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Google Play services ↗️ </span> </a> </li> <li class="devsite-nav-item"> <a href="https://play.google.com/sdks" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Google Play SDK index ↗️" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Google Play SDK index ↗️ </span> </a> </li> </ul> </div> </div> </nav> </devsite-book-nav> <section id="gc-wrapper"> <main role="main" class="devsite-main-content" has-book-nav has-sidebar > <div class="devsite-sidebar"> <div class="devsite-sidebar-content"> <devsite-toc class="devsite-nav" role="navigation" aria-label="On this page" depth="2" scrollbars ></devsite-toc> <devsite-recommendations-sidebar class="nocontent devsite-nav"> </devsite-recommendations-sidebar> </div> </div> <devsite-content> <article class="devsite-article"> <div class="devsite-article-meta nocontent" role="navigation"> <ul class="devsite-breadcrumb-list" aria-label="Breadcrumb"> <li class="devsite-breadcrumb-item "> <a href="https://developer.android.com/" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="1" track-type="globalNav" track-name="breadcrumb" track-metadata-position="1" track-metadata-eventdetail="Android Developers" > Android Developers </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developer.android.com/develop" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="2" track-type="globalNav" track-name="breadcrumb" track-metadata-position="2" track-metadata-eventdetail="" > Develop </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developer.android.com/studio" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="3" track-type="globalNav" track-name="breadcrumb" track-metadata-position="3" track-metadata-eventdetail="Android Studio" > Android Studio </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developer.android.com/tools" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="4" track-type="globalNav" track-name="breadcrumb" track-metadata-position="4" track-metadata-eventdetail="" > SDK tools </a> </li> </ul> <devsite-thumb-rating position="header"> </devsite-thumb-rating> </div> <h1 class="devsite-page-title" tabindex="-1"> AAPT2 </h1> <devsite-feature-tooltip ack-key="AckCollectionsBookmarkTooltipDismiss" analytics-category="Site-Wide Custom Events" analytics-action-show="Callout Profile displayed" analytics-action-close="Callout Profile dismissed" analytics-label="Create Collection Callout" class="devsite-page-bookmark-tooltip nocontent" dismiss-button="true" id="devsite-collections-dropdown" dismiss-button-text="Dismiss" close-button-text="Got it"> <devsite-bookmark></devsite-bookmark> <span slot="popout-heading"> Stay organized with collections </span> <span slot="popout-contents"> Save and categorize content based on your preferences. </span> </devsite-feature-tooltip> <div class="devsite-page-title-meta"><devsite-view-release-notes></devsite-view-release-notes></div> <devsite-toc class="devsite-nav" depth="2" devsite-toc-embedded > </devsite-toc> <devsite-recommendations-dropdown class="nocontent"></devsite-recommendations-dropdown> <div class="devsite-article-body clearfix "> <p>AAPT2 (Android Asset Packaging Tool) is a build tool that Android Studio and Android Gradle Plugin use to compile and package your app's <a href="/guide/topics/resources/providing-resources">resources</a>. AAPT2 parses, indexes, and compiles the resources into a binary format that is optimized for the Android platform.</p> <p>Android Gradle Plugin 3.0.0 and higher enables AAPT2 by default. You typically don't need to invoke <code translate="no" dir="ltr">aapt2</code> yourself. However, if you prefer to use your terminal and your own build system instead of Android Studio, you can use AAPT2 from the command line. You can also debug build errors related to AAPT2 from the command line. To do so, find AAPT2 as a standalone tool in <a href="/studio/releases/build-tools">Android SDK Build Tools</a> 26.0.2 and higher.</p> <p>To download Android SDK Build Tools from the command line, use <a href="/studio/command-line/sdkmanager"><code translate="no" dir="ltr">sdkmanager</code></a> and run the following command:</p> <pre class="none" translate="no" dir="ltr"> sdkmanager "build-tools;<var translate="no">build-tools-version</var>" </pre> <p>Once you have downloaded the SDK Build Tools, find AAPT2 in <code translate="no" dir="ltr"><var translate="no">android_sdk</var>/build-tools/<var translate="no">version</var>/</code>.</p> <p>Because revisions of the Android SDK Build Tools aren't released often, the version of AAPT2 included in your SDK Build Tools might not be the latest. To get the latest version of AAPT2, <a href="#download_aapt2">download AAPT2 from Google Maven</a>.</p> <p>To use AAPT2 from the command line on Linux or Mac, run the <code translate="no" dir="ltr">aapt2</code> command. On Windows, run the <code translate="no" dir="ltr">aapt2.exe</code> command.</p> <p>AAPT2 supports faster compilation of resources by enabling incremental compilation. To accomplish incremental compilation, resource processing is separated into two steps:</p> <ul> <li><a href="#compile">Compile</a>: compiles resource files into binary formats.</li> <li><a href="#link">Link</a>: merges all compiled files and packages them to a single package.</li> </ul> <p>This separation helps improve performance for incremental builds. For example, if there are changes in a single file, you need to recompile only that file.</p> <h2 id="download_aapt2" data-text="Download AAPT2 from Google Maven" tabindex="-1">Download AAPT2 from Google Maven</h2> <p>To get the newest version of AAPT2 that's not bundled in the build tools, download AAPT2 from Google's Maven repository as follows:</p> <ol> <li>In the <a href="https://maven.google.com/">repository index</a>, navigate to <strong>com.android.tools.build > aapt2</strong>.</li> <li>Copy the name of the latest version of AAPT2.</li> <li><p>Insert the version name you copied into the following URL and specify your target operating system: https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2/ <var translate="no">aapt2-version</var>/aapt2-<var translate="no">aapt2-version</var>-<var translate="no"> [windows | linux | osx]</var>.jar</p> <p>For example, to download version 3.2.0-alpha18-4804415 for Windows, use: https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2/ <strong>3.2.0-alpha18-4804415</strong>/aapt2-<strong>3.2.0-alpha18-4804415</strong>-<strong>windows</strong>.jar</p></li> <li><p>Navigate to the URL in a browser. AAPT2 will begin downloading shortly.</p></li> <li><p>Unpackage the JAR file you just downloaded.</p> <p>The JAR file should contain an <code translate="no" dir="ltr">aapt2</code> executable and some libraries that the executable depends on.</p></li> </ol> <h2 id="compile" data-text="Compile" tabindex="-1">Compile</h2> <p>AAPT2 supports compilation of all <a href="/guide/topics/resources/available-resources">Android resource types</a>, such as drawables and XML files. When you invoke AAPT2 for compilation, pass a single resource file as an input per invocation. AAPT2 then parses the file and generates an intermediate binary file with a <code translate="no" dir="ltr">.flat</code> extension.</p> <p>When passing whole directories, AAPT2 recompiles all files in the directory even when only one resource has changed. Although you can pass resource directories containing more than one resource file to AAPT2 using the <code translate="no" dir="ltr">--dir</code> flag, you don't gain the benefits of incremental resource compilation this way.</p> <p>The output file types can differ based on the input you provide for compilation, as shown in the following table:</p> <p class="table-caption"><strong>Table 1.</strong> The input and output file types for compilation</p> <table> <col width="25%" /> <tr> <th>Input</th> <th>Output</th> </tr> <tr> <td> XML resource files, such as <a href="/guide/topics/resources/string-resource">String</a> and <a href="/guide/topics/resources/style-resource">Style</a>, located in the <code translate="no" dir="ltr">res/values/</code> directory </td> <td> Resource table with <code translate="no" dir="ltr">*.arsc.flat</code> as its extension. </td> </tr> <tr> <td> All other resource files. </td> <td> <p> All files other than the files under <code translate="no" dir="ltr">res/values/</code> directory are converted to binary XML files with <code translate="no" dir="ltr">*.flat</code> extensions.</p> <p> Additionally all PNG files are crunched by default and adopt <code translate="no" dir="ltr">*.png.flat </code> extensions. If you choose not to compress PNGs, you can use the <code translate="no" dir="ltr">--no-crunch</code> option during compilation.</p> </td> </tr> </table> <p>The files AAPT2 outputs are not executables, and you must later include these binary files as input in the link phase to generate an APK. However, the generated APK file is not an executable that you can deploy on an Android device right away, because it does not contain DEX files and is not signed.</p> <h3 id="compile-syntax" data-text="Compile syntax" tabindex="-1">Compile syntax</h3> <p>The general syntax for using <code translate="no" dir="ltr">compile</code> is as follows: <pre class="none" translate="no" dir="ltr"> aapt2 compile <var translate="no">path-to-input-files</var> [<var translate="no">options</var>] -o <var translate="no">output-directory</var>/ </pre></p> <aside class="note"><strong>Note:</strong><span> For resource files, the path to input files must match the following structure: <var translate="no">path</var>/<var translate="no">resource-type[-config]</var>/<var translate="no">file</var></span></aside> <p>In the following example, AAPT2 compiles resource files named <code translate="no" dir="ltr">values.xml</code> and <code translate="no" dir="ltr">myImage.png</code> individually:</p> <pre class="none" translate="no" dir="ltr"> aapt2 compile <var translate="no">project_root</var>/<var translate="no">module_root</var>/src/main/res/values-en/strings.xml -o compiled/ aapt2 compile <var translate="no">project_root</var>/<var translate="no">module_root</var>/src/main/res/drawable/myImage.png -o compiled/ </pre> <p>As shown in table 1, the name of the output file depends on the input filename and the name of its parent directory.</p> <p>For the preceding example with <code translate="no" dir="ltr">strings.xml</code> file as the input, <code translate="no" dir="ltr">aapt2</code> automatically names the output file as <code translate="no" dir="ltr">values-en_strings.arsc.flat</code>. However, the compiled drawable file stored in the drawable directory is named <code translate="no" dir="ltr">drawable_img.png.flat</code>.</p> <h3 id="compile_options" data-text="Compile options" tabindex="-1">Compile options</h3> <p>There are several options that you can use with the <code translate="no" dir="ltr">compile</code> command, as shown in table 2:</p> <p class="table-caption"><strong>Table 2.</strong> Compile command options</p> <table> <col width="25%"/> <tr> <th>Option</th> <th>Description</th> </tr> <tr> <td> <code translate="no" dir="ltr">-o <var translate="no">path</var></code> </td> <td> <p>Specifies the output path for the compiled resource(s).</p> <p>This is a <b>required</b> flag, because you must specify a path to a directory where AAPT2 can output and store the compiled resources.</p> </td> </tr> <tr> <td> <code translate="no" dir="ltr">--dir <var translate="no">directory</var></code> </td> <td> <p>Specifies the directory to scan for resources. </p> <p>Although you can use this flag to compile multiple resource files with one command, it disables the benefits of incremental compilation. Therefore, this flag shouldn't be used for large projects.</p> </td> </tr> <tr> <td> <code translate="no" dir="ltr">--pseudo-localize</code> </td> <td> Generates <a href="/guide/topics/resources/pseudolocales">pseudolocalized</a> versions of default strings, such as <code translate="no" dir="ltr">en-XA</code> and <code translate="no" dir="ltr">en-XB</code>. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--no-crunch</code> </td> <td> Disables PNG processing. <p></p> <p>Use this option if you have already processed the PNG files or if you are creating debug builds that don't require file size reduction. Enabling this option results in faster execution but increases the output file size. </p> </td> </tr> <tr> <td> <code translate="no" dir="ltr">--legacy</code> </td> <td> Treats errors that are permissible when using earlier versions of AAPT as warnings.<p></p> <p>This flag should be used for unexpected compile-time errors. To resolve known behavior changes that might occur while using AAPT2, read <a href="#aapt2_changes">Behavior changes when using AAPT2</a>.</p> </td> </tr> <tr> <td> <code translate="no" dir="ltr">-zip <var translate="no">file</var></code> </td> <td> <var translate="no">file</var> is a ZIP file containing the <code translate="no" dir="ltr">res</code> directory to scan for resources. </td> </tr> <tr> <td> <code translate="no" dir="ltr">-output-text-symbols <var translate="no">file</var></code> </td> <td> Generates a text file containing the resource symbols in the specified <arg>file</arg>. </td> </tr> <tr> <td> <code translate="no" dir="ltr">-preserve-visibility-of-styleables</code> </td> <td> If specified, applies the same visibility rules for styleables that are used for all other resources. Otherwise, all styleables are made public. </td> </tr> <tr> <td> <code translate="no" dir="ltr">-visibility [<var translate="no">public</var>|<var translate="no">private</var>|<var translate="no">default</var>|]</code> </td> <td> Sets the visibility of the compiled resources to the specified level. </td> </tr> <tr> <td> <code translate="no" dir="ltr">-trace-folder <var translate="no">folder</var></code> </td> <td> Generates a <code translate="no" dir="ltr">systrace</code> JSON trace fragment to the specified <arg>folder</arg>. </td> </tr> <tr> <td> <code translate="no" dir="ltr">-source-path <var translate="no">path</var></code> </td> <td> Sets the compiled resource file's source file path to <arg>path</arg>. </td> </tr> <tr> <td> <code translate="no" dir="ltr">-h</code> </td> <td> Displays the tools help. </td> </tr> <tr> <td> <code translate="no" dir="ltr">-v</code> </td> <td> Enables verbose logging. </td> </tr> </table> <h2 id="link" data-text="Link" tabindex="-1">Link</h2> <p>In the link phase, AAPT2 merges all the intermediate files that the compilation phase generates, such as resource tables, binary XML files, and processed PNG files, and then packages the files into a single APK. Additionally, other auxiliary files, such as <code translate="no" dir="ltr">R.java</code> and ProGuard rules files, can be generated during this phase. However, the generated APK does not contain DEX bytecode and is unsigned. You can't deploy this APK to a device.</p> <p>If you're not using the Android Gradle plugin to <a href="/studio/build/building-cmdline">build your app from the command line</a>, you can use other command-line tools, such as <a href="/studio/command-line/d8">d8</a> to compile Java bytecode into DEX bytecode and <a href="/studio/command-line/apksigner">apksigner</a> to sign your APK.</p> <h3 id="link_syntax" data-text="Link syntax" tabindex="-1">Link syntax</h3> <p>The general syntax for using <code translate="no" dir="ltr">link</code> is as follows:</p> <pre class="none" translate="no" dir="ltr"> aapt2 link <var translate="no">path-to-input-files</var> <var translate="no">[options]</var> -o <var translate="no">outputdirectory</var>/<var translate="no">outputfilename</var>.apk --manifest AndroidManifest.xml </pre> <p>In the following example, AAPT2 merges two intermediate files, <code translate="no" dir="ltr">drawable_Image.flat</code> and <code translate="no" dir="ltr">values_values.arsc.flat</code>, and the <code translate="no" dir="ltr">AndroidManifest.xml</code> file. AAPT2 links the result against the <code translate="no" dir="ltr">android.jar</code> file, which holds the resources defined in the <code translate="no" dir="ltr">android</code> package:</p> <pre class="none" translate="no" dir="ltr"> aapt2 link -o output.apk -I <var translate="no">android_sdk</var>/platforms/<var translate="no">android_version</var>/android.jar compiled/res/values_values.arsc.flat compiled/res/drawable_Image.flat --manifest /<var translate="no">path</var>/<var translate="no">to</var>/AndroidManifest.xml -v </pre> <h3 id="link_options" data-text="Link options" tabindex="-1">Link options</h3> <p>You can use the following options with the <code translate="no" dir="ltr">link</code> command:</p> <p class="table-caption"><strong>Table 3.</strong> Link command options</p> <table> <col width="25%"/> <tr> <th>Option</th> <th>Description</th> </tr> <tr> <td> <code translate="no" dir="ltr">-o <var translate="no">path</var></code> </td> <td> <p>Specifies the output path for the linked resource APK.</p> <p>This is a <b>required</b> flag, because you must specify the path for the output APK that can hold the linked resources.</p> </td> </tr> <tr> <td> <code translate="no" dir="ltr">--manifest <var translate="no">file</var></code> </td> <td> <p>Specifies the path to the Android manifest file to build.</p> <p> This is a <b>required</b> flag, because the manifest file encloses essential information about your app, like package name and application ID. </p> </td> </tr> <tr> <td> <code translate="no" dir="ltr">-I</code> </td> <td> <p>Provides the path to the platform's <code translate="no" dir="ltr">android.jar</code> or other APKs, like <code translate="no" dir="ltr">framework-res.apk</code>, which might be useful while building features.</p> This flag is <b>required</b> if you are using attributes with the <code translate="no" dir="ltr">android</code> namespace in your resource files. </td> </tr> <tr> <td> <code translate="no" dir="ltr">-A <var translate="no">directory</var></code> </td> <td> Specifies an assets directory to be included in the APK.</p> <p>You can use this directory to store original, unprocessed files. To learn more, read <a href="/guide/topics/resources/providing-resources#OriginalFiles"> Accessing original files</a>.</p> </td> </tr> <tr> <td> <code translate="no" dir="ltr">-R <var translate="no">file</var> </code> </td> <td> Passes an individual <code translate="no" dir="ltr">.flat</code> file to <code translate="no" dir="ltr">link</code>, using <code translate="no" dir="ltr">overlay</code> semantics without using the <code translate="no" dir="ltr"><add-resource></code> tag. <p></p> <p>When you a provide a resource file that overlays an existing file, the last conflicting resource given is used.</p> </td> </tr> <tr> <td> <code translate="no" dir="ltr">--package-id <var translate="no">package-id</var></code> </td> <td> Specifies the package ID to use for your app.<p></p> <p>The package ID you specify must be greater than or equal to 0x7f unless used in combination with <code translate="no" dir="ltr">--allow-reserved-package-id</code>.</p> </td> </tr> <tr> <td> <code translate="no" dir="ltr">--allow-reserved-package-id</code> </td> <td> <p>Allows the use of a reserved package ID.</p> <p>Reserved package IDs are IDs that are normally assigned to shared libraries and in the range from 0x02 to 0x7e, inclusive. By using <code translate="no" dir="ltr">--allow-reserved-package-id</code>, you can assign IDs that fall in the range of reserved package IDs.</p> <p>This option should only be used for packages with a <code translate="no" dir="ltr">min-sdk</code> version of 26 or lower.</p> </td> </tr> <tr> <td> <code translate="no" dir="ltr">--java <var translate="no">directory</var></code> </td> <td> Specifies the directory to generate <code translate="no" dir="ltr">R.java</code> in. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--proguard <var translate="no">proguard_options</var></code> </td> <td> Generates the output file for ProGuard rules. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--proguard-conditional-keep-rules</code> </td> <td> Generates the output file for ProGuard rules for the main DEX. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--no-auto-version</code> </td> <td> Disables automatic style and layout SDK versioning. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--no-version-vectors</code> </td> <td> Disables automatic versioning of vector drawables. Use this flag only when building your APK with the Vector Drawable Library. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--no-version-transitions</code> </td> <td> Disables automatic versioning of transition resources. Use this flag only when building your APK with the Transition Support library. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--no-resource-deduping</code> </td> <td> Disables automatic de-duplication of resources with identical values across compatible configurations. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--enable-sparse-encoding</code> </td> <td> Enables encoding of sparse entries using a binary search tree. This is useful for optimization of APK size but at the cost of resource retrieval performance. </td> </tr> <tr> <td> <code translate="no" dir="ltr">-z</code> </td> <td> Requires localization of strings marked 'suggested'. </td> </tr> <tr> <td> <code translate="no" dir="ltr">-c <var translate="no">config</var></code> </td> <td> Provides a comma-separated list of configurations. <p></p> <p>For example, if you have dependencies on the support library, which contains translations for multiple languages, you can filter resources just for the given language configuration, like English or Spanish.</p> <p>You must define the language configuration by a two-letter ISO 639-1 language code, optionally followed by a two letter ISO 3166-1-alpha-2 region code preceded by lowercase 'r'. For example, en-rUS.</p> </td> </tr> <tr> <td> <code translate="no" dir="ltr">--preferred-density <var translate="no">density</var></code> </td> <td> Allows AAPT2 to select the closest matching density and strip out all others. <p></p> <p>There are several pixel density qualifiers available to use in your app, such as ldpi, hdpi, and xhdpi. When you specify a preferred density, AAPT2 selects and stores the closest matching density in the resource table and removes all others.</p> </td> </tr> <tr> <td> <code translate="no" dir="ltr">--output-to-dir</code> </td> <td> Outputs the APK contents to a directory specified by <code translate="no" dir="ltr">-o</code>.<p/> <p>If you get any errors using this flag, you can resolve them by upgrading to <a href="/studio/releases/build-tools">Android SDK Build Tools 28.0.0 or higher</a>.</p> </td> </tr> <tr> <td> <code translate="no" dir="ltr">--min-sdk-version <var translate="no">min-sdk-version</var></code> </td> <td> Sets the default minimum SDK version to use for <code translate="no" dir="ltr">AndroidManifest.xml</code>. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--target-sdk-version <var translate="no">target-sdk-version</var></code> </td> <td> Sets the default target SDK version to use for <code translate="no" dir="ltr">AndroidManifest.xml</code>. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--version-code <var translate="no">version-code</var></code> </td> <td> Specifies the version code to inject into <code translate="no" dir="ltr">AndroidManifest.xml</code> if none is present. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--version-name <var translate="no">version-name</var></code> </td> <td> Specifies the version name to inject into <code translate="no" dir="ltr">AndroidManifest.xml</code> if none is present. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--revision-code <var translate="no">revision-code</var></code> </td> <td> Specifies the revision code to inject into <code translate="no" dir="ltr">AndroidManifest.xml</code> file if none is present. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--replace-version</code> </td> <td> If <code translate="no" dir="ltr">--version-code</code>, <code translate="no" dir="ltr">--version-name</code>, or <code translate="no" dir="ltr">--revision-code</code> are specified, these values replace any value already in the manifest. By default, nothing changes if the manifest already defines these attributes. </td> </tr> <tr> <td> <code translate="no" dir="ltr"> --compile-sdk-version-nacodeme <var translate="no">compile-sdk-version-name</var> </code> </td> <td> Specifies the version code to inject into <code translate="no" dir="ltr">AndroidManifest.xml</code> file if none is present. </td> </tr> <tr> <td> <code translate="no" dir="ltr"> --compile-sdk-version-name <var translate="no">compile-sdk-version-name</var> </code> </td> <td> Specifies the version name to inject into <code translate="no" dir="ltr">AndroidManifest.xml</code> file if none is present. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--proto-format</code> </td> <td> Generates compiled resources in Protobuf format. <p>Suitable as input to the <a href="/studio/build/building-cmdline#bundletool-build"> <code translate="no" dir="ltr">bundletool</code> </a> for generating an Android App Bundle.</p> </td> </tr> <tr> <td> <code translate="no" dir="ltr">--non-final-ids</code> </td> <td> Generates <code translate="no" dir="ltr">R.java</code> with non-final resource IDs. References to the IDs from app’s code aren't inlined during <code translate="no" dir="ltr">kotlinc</code> or <code translate="no" dir="ltr">javac</code> compilation. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--emit-ids <var translate="no">path</var></code> </td> <td> Emits a file at the given path with a list of names of resource types and their ID mappings. This is suitable to use with <code translate="no" dir="ltr">--stable-ids</code>. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--stable-ids <var translate="no">outputfilename.ext</var></code> </td> <td> Consumes the file generated with <code translate="no" dir="ltr">--emit-ids</code> containing the list of names of resource types and their assigned IDs. <p></p> <p>This option allows assigned IDs to remain stable even when you delete or add new resources while linking.</p> </td> </tr> <tr> <td> <code translate="no" dir="ltr">--custom-package <var translate="no">package_name</var></code> </td> <td> Specifies the custom Java package to generate <code translate="no" dir="ltr">R.java</code> under. </td> </tr> <tr> <td> <code translate="no" dir="ltr"> --extra-packages <var translate="no">package_name</var></code> </td> <td> Generates the same <code translate="no" dir="ltr">R.java</code> file, but with different package names. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--add-javadoc-annotation <var translate="no">annotation</var></code> </td> <td> Adds a JavaDoc annotation to all generated Java classes. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--output-text-symbols <var translate="no">path</var></code> </td> <td> Generates a text file containing the resource symbols of the <code translate="no" dir="ltr">R</code> class in the specified file.</p> <p>You must specify the path to the output file.</p> </td> </tr> <tr> <td> <code translate="no" dir="ltr">--auto-add-overlay</code> </td> <td> Allows the addition of new resources in overlays without using the <code translate="no" dir="ltr"><add-resource></code> tag. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--rename-manifest-package <var translate="no">manifest-package</var></code> </td> <td> Renames the package in <code translate="no" dir="ltr">AndroidManifest.xml</code> file. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--rename-instrumentation-target-package <var translate="no">instrumentation- target-package</var></code> </td> <td> Changes the name of the target package for <a href="/reference/android/app/Instrumentation"> <code translate="no" dir="ltr">instrumentation</code></a>.<p/> <p>This option should be used in conjunction with <code translate="no" dir="ltr">--rename-manifest-package</code>.</p> </td> </tr> <tr> <td> <code translate="no" dir="ltr">-0 <var translate="no">extension</var></code> </td> <td> <p>Specifies the extensions of files that you don't want to compress.</p> </td> </tr> <tr> <td> <code translate="no" dir="ltr">--split <var translate="no">path:config[,config[..]]</var> </code> </td> <td> Splits resources based on a set of configurations to generate a different version of the APK. <p></p> <p> You must specify the path to the output APK along with the set of configurations.</p> </td> </tr> <tr> <td> <code translate="no" dir="ltr">--proguard-main-dex <var translate="no">file</var></code> </td> <td> Output file for generated ProGuard rules for the main DEX. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--proguard-minimal-keep-rules</code> </td> <td> Generates a minimal set of ProGuard keep rules. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--no-resource-removal</code> </td> <td> Disables automatic removal of resources without defaults. Use this option only when building runtime resource overlay packages. </td> </tr> </tr> <tr> <td> <code translate="no" dir="ltr">-x</code> </td> <td> Legacy flag that specifies the use of the package identifier 0x01. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--product <var translate="no">products-list</var></code> </td> <td> Specifies a comma-separated list of product names to keep. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--no-xml-namespaces</code> </td> <td> Removes XML namespace prefix and URI information from <code translate="no" dir="ltr">AndroidManifest.xml</code> file and XML binaries in <code translate="no" dir="ltr">res/*</code>. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--shared-lib</code> </td> <td> Generates a shared Android runtime library. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--static-lib</code> </td> <td> Generates a static Android library. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--no-static-lib-packages</code> </td> <td> Merges all library resources under the app's package. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--no-proguard-location-reference</code> </td> <td> Keeps ProGuard rules files from having a reference to the source file. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--private-symbols <var translate="no">package-name</var></code> </td> <td> <var translate="no">package-name</var> specifies the package name to use when generating <code translate="no" dir="ltr">R.java</code> for private symbols. If not specified, public and private symbols use the app's package name. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--override-styles-instead-of-overlaying</code> </td> <td> Causes styles defined in <code translate="no" dir="ltr">-R</code> resources to replace previous definitions instead of merging them. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--rename-resources-package <var translate="no">package-name</var></code> </td> <td> Renames the package in the resources table to <var translate="no">package-name</var>. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--no-compress</code> </td> <td> Doesn't compress any resources. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--keep-raw-values</code> </td> <td> Preserves raw attribute values in XML files. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--no-compress-regex <var translate="no">regular-expression</var></code> </td> <td> Doesn't compress extensions matching <var translate="no">regular-expression</var>. Use the <code translate="no" dir="ltr">$</code> symbol for end of line. Uses a case-sensitive ECMAScript regular expression grammar. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--warn-manifest-validation</code> </td> <td> Treats manifest validation errors as warnings. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--exclude-configs <var translate="no">qualifier[,qualifier[..]]</var></code> </td> <td> Excludes values of resources whose configs contain the specified qualifiers. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--debug-mode</code> </td> <td> Inserts <code translate="no" dir="ltr">android:debuggable="true"</code> in to the application node of the manifest, making the application debuggable even on production devices. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--strict-visibility</code> </td> <td> Doesn't allow overlays with different visibility levels. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--exclude-sources</code> </td> <td> Doesn't serialize source file information when generating resources in Protobuf format. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--trace-folder <var translate="no">folder</var></code> </td> <td> Generates <code translate="no" dir="ltr">systrace</code> JSON trace fragment to specified <var translate="no">folder</var>. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--merge-only</code> </td> <td> Only merges the resources without verifying resource references. This flag should only be used with the <code translate="no" dir="ltr">--static-lib</code> flag. </td> </tr> <tr> <td> <code translate="no" dir="ltr">-h</code> </td> <td> Displays the help menu. </td> </tr> <tr> <td> <code translate="no" dir="ltr">-v</code> </td> <td> Enables increased verbosity of the output. </td> </tr> </table> <h2 id="dump" data-text="Dump" tabindex="-1">Dump</h2> <p><code translate="no" dir="ltr">dump</code> is used for printing information about the APK you generated using the <code translate="no" dir="ltr">link</code> command.</p> <h3 id="dump_syntax" data-text="Dump syntax" tabindex="-1">Dump syntax</h3> <p>The general syntax for using <code translate="no" dir="ltr">dump</code> is as follows:</p> <pre class="none" translate="no" dir="ltr"> aapt2 dump <var translate="no">sub-command</var> <var translate="no">filename.apk</var> <var translate="no">[options]</var> </pre> <p>The following example prints content from the resource table of the specified APK:</p> <pre class="none" translate="no" dir="ltr"> aapt2 dump resources output.apk </pre> <h3 id="dump_commands" data-text="Dump sub-commands" tabindex="-1">Dump sub-commands</h3> <p>Specify one of the following sub-commands with the <code translate="no" dir="ltr">dump</code> command:</p> <p class="table-caption"><strong>Table 4.</strong> Dump sub-commands</p> <table> <col width="25%"> <tr> <th>Sub-command</th><th>Description</th> </tr> <tr> <td> <code translate="no" dir="ltr">apc</code> </td> <td> Prints the contents of the AAPT2 Container (APC) generated during compilation. </td> </tr> <tr> <td> <code translate="no" dir="ltr">badging</code> </td> <td> Prints information extracted from the APK's manifest. </td> </tr> <tr> <td> <code translate="no" dir="ltr">configurations</code> </td> <td> Prints every configuration used by a resource in the APK. </td> </tr> <tr> <td> <code translate="no" dir="ltr">overlayable</code> </td> <td> Prints the overlayable resources of the APK. </td> </tr> <tr> <td> <code translate="no" dir="ltr">packagename</code> </td> <td> Prints the APK's package name. </td> </tr> <tr> <td> <code translate="no" dir="ltr">permissions</code> </td> <td> Prints the permissions extracted from the APK's manifest. </td> </tr> <tr> <td> <code translate="no" dir="ltr">strings</code> </td> <td> Prints the contents of the APK's resource table string pool. </td> </tr> <tr> <td> <code translate="no" dir="ltr">styleparents</code> </td> <td> Prints the parents of styles used in the APK. </td> </tr> <tr> <td> <code translate="no" dir="ltr">resources</code> </td> <td> Prints the contents of the APK's resource table. </td> </tr> <tr> <td> <code translate="no" dir="ltr">xmlstrings</code> </td> <td> Prints strings from the APK's compiled XML. </td> </tr> <tr> <td> <code translate="no" dir="ltr">xmltree</code> </td> <td> Prints a tree of the APK's compiled XML. </td> </tr> </table> <h3 id="dump_options" data-text="Dump options" tabindex="-1">Dump options</h3> <p>Use the following options with <code translate="no" dir="ltr">dump</code>:</p> <p class="table-caption"><strong>Table 5.</strong> Dump options</p> <table> <col width="25%"> <tr> <th>Option</th><th>Description</th> </tr> <tr> <td> <code translate="no" dir="ltr">--no-values</code> </td> <td> Suppresses the output of values when displaying resource. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--file <var translate="no">file</var></code> </td> <td> Specifies a file as an argument to be dumped from the APK. </td> </tr> <tr> <td> <code translate="no" dir="ltr">-v</code> </td> <td> Increases verbosity of the output. </td> </tr> </table> <h2 id="diff" data-text="Diff" tabindex="-1">Diff</h2> <p>Use <code translate="no" dir="ltr">diff</code> to compare two APKs and identify any differences between them.</p> <h3 id="diff_syntax" data-text="Diff syntax" tabindex="-1">Diff syntax</h3> <p>The general syntax for using <code translate="no" dir="ltr">diff</code> is as follows:</p> <pre class="none" translate="no" dir="ltr"> aapt2 diff <var translate="no">first.apk second.apk</var> </pre> <p>There are no options for the <code translate="no" dir="ltr">diff</code> command.</p> <h2 id="optimize" data-text="Optimize" tabindex="-1">Optimize</h2> <p><code translate="no" dir="ltr">optimize</code> is used to run optimizations on the merged resources and <code translate="no" dir="ltr">resources.arsc</code> before they are packaged into the APK. This optimization can reduce APK size by around 1-3%, depending on the size and number of resources that are being used.</p> <h3 id="optimize_syntax" data-text="Optimize syntax" tabindex="-1">Optimize syntax</h3> <p>The general syntax for using <code translate="no" dir="ltr">optimize</code> is as follows:</p> <pre class="none" translate="no" dir="ltr"> aapt2 optimize <var translate="no">options file[,file[..]]</var> </pre> <p>The following example optimizes the resources in <code translate="no" dir="ltr">input.apk</code> and creates a new, optimized APK in <code translate="no" dir="ltr">output.apk</code>. It replaces the usual flat table representation with a more compact binary search tree, resulting in a smaller APK at the cost of retrieval performance:</p> <pre class="none" translate="no" dir="ltr"> aapt2 optimize -o output.apk --enable-sparse-encoding input.apk </pre> <h3 id="optimize_options" data-text="Optimize options" tabindex="-1">Optimize options</h3> <p>You can use the following options with <code translate="no" dir="ltr">optimize</code>:</p> <p class="table-caption"><strong>Table 6.</strong> Optimize options</p> <table> <col width="25%"> <tr> <th>Option</th><th>Description</th> </tr> <tr> <td> <code translate="no" dir="ltr">-o <var translate="no">path</var></code> </td> <td> Specifies the output path for the linked resource APK.<p></p> <p>This is a <b>required</b> flag, because you must specify the path for the output APK that can hold the linked resources.</p> </td> </tr> <tr> <td> <code translate="no" dir="ltr">-d <var translate="no">directory</var></code> </td> <td> Specifies the path to the output directory for splits. </td> </tr> <tr> <td> <code translate="no" dir="ltr">-x <var translate="no">path</var></code> </td> <td> Specifies the path to the XML configuration file. </td> </tr> <tr> <td> <code translate="no" dir="ltr">-p</code> </td> <td> Prints the multi-APK artifacts and exit. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--target-densities <var translate="no">density[,density[..]]</var></code> </td> <td> Specifies a comma-separated list of the screen densities that the APK is optimized for. All resources that would be unused on devices of the given densities are removed from the APK. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--resources-config-path <var translate="no">path</var></code> </td> <td> <p>Specifies the path to the <code translate="no" dir="ltr">resources.cfg</code> file containing the list of resources and directives to each resource.</p> <p>Format: <var translate="no">type/resource_name#[directive][,directive]</var></p> </td> </tr> <tr> <td> <code translate="no" dir="ltr">-c <var translate="no">config[,config[..]]</var></code> </td> <td> Specifies a comma-separated list of configurations to include. The default is all configurations. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--split <var translate="no">path:config[,config[..]]</var> </code> </td> <td> Splits resources based on a set of configurations to generate a different version of the APK. <p></p> <p> You must specify the path to the output APK along with the set of configurations.</p> </td> </tr> <tr> <td> <code translate="no" dir="ltr">--keep-artifacts <var translate="no">artifact[,artifact[..]]</var> </code> </td> <td> Specifies a comma-separated list of artifacts to keep. If none are specified, all artifacts are kept. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--enable-sparse-encoding</code> </td> <td> Enables encoding of sparse entries using a binary search tree. This option is useful for optimization of APK size but at the cost of resource retrieval performance. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--collapse-resource-names</code> </td> <td> Collapses resource names to a single value in the key string pool. Resources are exempted using the <code translate="no" dir="ltr">no_collapse</code> directive in a file specified by <code translate="no" dir="ltr">--resources-config-path</code>. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--shorten-resource-paths</code> </td> <td>Shortens the paths of resources inside the APK.</td> </tr> <tr> <td> <code translate="no" dir="ltr">--resource-path-shortening-map <var translate="no">path</var></code> </td> <td> Specifies the path to output the map of old resource paths to shortened paths. </td> </tr> <tr> <td> <code translate="no" dir="ltr">-v</code> </td> <td> Increases verbosity of the output. </td> </tr> <tr> <td> <code translate="no" dir="ltr">-h</code> </td> <td> Displays the tool help. </td> </tr> </table> <h2 id="convert" data-text="Convert" tabindex="-1">Convert</h2> <p>By default, the AAPT <code translate="no" dir="ltr">compile</code> command compiles resources in to a binary format that is suitable for APKs. It is possible to also specify protobuf format that is suitable for AABs by specifying <code translate="no" dir="ltr">--proto-format</code>. The <code translate="no" dir="ltr">convert</code> command converts APKs between the two formats.</p> <h3 id="convert-syntax" data-text="Convert syntax" tabindex="-1">Convert syntax</h3> <p>The general syntax for <code translate="no" dir="ltr">convert</code> is as follows:</p> <pre class="none" translate="no" dir="ltr"> aapt2 convert -o <var translate="no">output-file</var> <var translate="no">options file[,file[..]]</var> </pre> <p>The following example converts the resources in <code translate="no" dir="ltr">input.apk</code> and creates a new, APK in <code translate="no" dir="ltr">output.apk</code> containing protobuf format resources. It replaces the usual flat table representation with a more compact binary search tree, resulting in a smaller APK at the cost of retrieval performance:</p> <pre class="none" translate="no" dir="ltr"> aapt2 convert -o output.apk --output-format proto --enable-sparse-encoding input.apk </pre> <h3 id="convert_options" data-text="Convert Options" tabindex="-1">Convert Options</h3> <p>Use the following options with <code translate="no" dir="ltr">convert</code>:</p> <p class="table-caption"><strong>Table 7.</strong> Convert options</p> <table> <col width="25%"> <tr> <th>Option</th><th>Description</th> </tr> <tr> <td> <code translate="no" dir="ltr">-o <var translate="no">path</var></code> </td> <td> <p>Specifies the output path for the linked resource APK.</p> <p>This is a <b>required</b> flag, because you must specify the path for the output APK that can hold the linked resources.</p> </td> </tr> <td> <code translate="no" dir="ltr">--output-format <var translate="no">[proto|binary]</var></code> </td> <td> Format of the output. Accepted values are <code translate="no" dir="ltr">proto</code> and <code translate="no" dir="ltr">binary</code>. When not set, defaults to <code translate="no" dir="ltr">binary</code>. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--enable-sparse-encoding</code> </td> <td> Enables encoding of sparse entries using a binary search tree. This option is useful for optimization of APK size but at the cost of resource retrieval performance. </td> </tr> <tr> <td> <code translate="no" dir="ltr">--keep-raw-values</code> </td> <td> Preserves raw attribute values in XML files. </td> </tr> <tr> <td> <code translate="no" dir="ltr">-v</code> </td> <td> Increases verbosity of the output. </td> </tr> <tr> <td> <code translate="no" dir="ltr">-h</code> </td> <td> Displays the tool help. </td> </tr> </table> <h2 id="daemon" data-text="Daemon mode" tabindex="-1">Daemon mode</h2> <p>AAPT version 2.19 introduced daemon mode for issuing commands. Daemon mode lets you enter multiple commands in a single AAPT session.</p> <h3 id="daemon_syntax" data-text="Daemon syntax" tabindex="-1">Daemon syntax</h3> <p>Start daemon mode with the following command:</p> <pre class="none" translate="no" dir="ltr"> aapt2 daemon </pre> <p>Once daemon mode is running, you can enter commands. Each argument of the command must be on a separate line, with a blank line at the end of the command. Exit daemon mode by typing Control+D.</p> <p>Consider the following individual <code translate="no" dir="ltr">compile</code> commands:</p> <pre class="none" translate="no" dir="ltr"> aapt2 compile <var translate="no">project_root</var>/<var translate="no">module_root</var>/src/main/res/values-en/strings.xml -o compiled/ aapt2 compile <var translate="no">project_root</var>/<var translate="no">module_root</var>/src/main/res/drawable/myImage.png -o compiled/ </pre> <p>These commands can be entered in daemon mode as:</p> <pre class="none" translate="no" dir="ltr"> aapt2 daemon Ready compile <var translate="no">project_root</var>/<var translate="no">module_root</var>/src/main/res/values-en/strings.xml -o compiled/ Done compile <var translate="no">project_root</var>/<var translate="no">module_root</var>/src/main/res/drawable/myImage.png -o compiled/ Done ^D Exiting daemon </pre> <h3 id="daemon_options" data-text="Daemon mode options" tabindex="-1">Daemon mode options</h3> <p>The single option for daemon mode is <code translate="no" dir="ltr">--trace-folder <var translate="no">folder</var></code>, which generates a <code translate="no" dir="ltr">systrace</code> JSON trace fragment to specified <var translate="no">folder</var>.</p> <h2 id="version" data-text="Version" tabindex="-1">Version</h2> <p>Determine the version of AAPT2 you are using with the <code translate="no" dir="ltr">version</code> command:</p> <pre class="none" translate="no" dir="ltr"> aapt2 version Android Asset Packaging Tool (aapt) 2.19-8678579 </pre> <h2 id="aapt2_changes" data-text="Behavior changes when using AAPT2" tabindex="-1">Behavior changes when using AAPT2</h2> <p>Prior to AAPT2, AAPT was the default version of the Android Asset Packaging Tool, which is now deprecated. Although AAPT2 should immediately work with older projects, this section describes some behavior changes you should be aware of.</p> <h3 id="aapt2_element_hierarchy" data-text="Element hierarchies in the Android manifest" tabindex="-1">Element hierarchies in the Android manifest</h3> <p>In previous versions of AAPT, elements nested in incorrect nodes in the <code translate="no" dir="ltr">AndroidManifest.xml</code> file were either ignored or resulted in a warning. For example, consider the following example:</p> <pre class="prettyprint lang-xml" translate="no" dir="ltr"> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.myname.myapplication"> <application ... <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <var translate="no"><action android:name="android.intent.action.CUSTOM" /></var> </activity> </application> </manifest> </pre> <p>Previous versions of AAPT would simply ignore the misplaced <code translate="no" dir="ltr"><action></code> tag.</p> <p>With AAPT2, you receive the following error:</p> <pre class="none" translate="no" dir="ltr"> AndroidManifest.xml:15: error: unknown element <action> found. </pre> <p>To resolve the issue, make sure your manifest elements are nested correctly. For more information, read the <a href="/guide/topics/manifest/manifest-intro">App Manifest overview</a>.</p> <h3 id="aapt2_resource_naming" data-text="Declaration of resources" tabindex="-1">Declaration of resources</h3> <p>You can no longer indicate the type of a resource from the <code translate="no" dir="ltr">name</code> attribute. The following example incorrectly declares an <code translate="no" dir="ltr">attr</code> resource item:</p> <pre class="prettyprint lang-xml" translate="no" dir="ltr"> <style name="childStyle" parent="parentStyle"> <item name="attr/my_attr">@color/pink</item> </style> </pre> <p>Declaring a resource type this way results in the following build error:</p> <pre class="none" translate="no" dir="ltr"> Error: style attribute 'attr/attr/my_attr (aka my.package:attr/attr/my_attr)' not found. </pre> <p>To resolve this error, explicitly declare the type using <code translate="no" dir="ltr">type="attr"</code>:</p> <pre class="prettyprint lang-xml" translate="no" dir="ltr"> <style name="childStyle" parent="parentStyle"> <item type="attr" name="my_attr">@color/pink</item> </style> </pre> <p>Additionally, when declaring a <code translate="no" dir="ltr"><style></code> element, its parent must also be a style resource type. Otherwise, you get an error similar to the following:</p> <pre class="none" translate="no" dir="ltr"> Error: (...) invalid resource type 'attr' for parent of style </pre> <h3 id="at_symbol" data-text="Incorrect use of @ resource reference symbols" tabindex="-1">Incorrect use of @ resource reference symbols</h3> <p>AAPT2 throws build errors when you omit or incorrectly place resource reference symbols (<code translate="no" dir="ltr">@</code>). For example, if you omit the symbol when specifying a style attribute:</p> <pre class="prettyprint lang-xml" translate="no" dir="ltr"> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> ... <!-- Note the missing '@' symbol when specifying the resource type. --> <item name="colorPrimary">color/colorPrimary</item> </style> </pre> <p>When building the module, AAPT2 throws the following build error:</p> <pre class="none" translate="no" dir="ltr"> ERROR: expected color but got (raw string) color/colorPrimary </pre> <p>Additionally, if you incorrectly include the symbol when accessing a resource from the <code translate="no" dir="ltr">android</code> namespace:</p> <pre class="prettyprint lang-xml" translate="no" dir="ltr"> ... <!-- When referencing resources from the 'android' namespace, omit the '@' symbol. --> <item name="@android:windowEnterAnimation"/> </pre> <p>When building the module, AAPT2 throws the following build error:</p> <pre class="none" translate="no" dir="ltr"> Error: style attribute '@android:attr/windowEnterAnimation' not found </pre> <h3 id="incorrect_configuration_of_libraries" data-text="Incorrect configuration of libraries" tabindex="-1">Incorrect configuration of libraries</h3> <p>If your app has a dependency on a third-party library that was built using older versions of the <a href="/studio/releases/build-tools">Android SDK Build Tools</a>, your app might crash at runtime without displaying any errors or warnings. This crash might occur because during the library's creation, the <code translate="no" dir="ltr">R.java</code> fields are declared <code translate="no" dir="ltr">final</code>. As a result, all the resource IDs are inlined in the library's classes.</p> <p>AAPT2 relies on being able to re-assign IDs to library resources when building your app. If the library assumes the IDs are <code translate="no" dir="ltr">final</code> and inlines them in the library DEX, there is a runtime mismatch.</p> <p>To resolve this error, contact the library author to rebuild the library using the latest version of the Android SDK Build Tools, and republish the library.</p> <devsite-hats-survey class="nocontent" hats-id="VxqvKSur40kxBYCLVTd0SSGykbno" listnr-id="5207477"></devsite-hats-survey> </div> <devsite-recommendations display="in-page" hidden yield> </devsite-recommendations> <devsite-thumb-rating position="footer"> </devsite-thumb-rating> <devsite-recommendations id="recommendations-link" yield></devsite-recommendations> <div class="devsite-floating-action-buttons"> </div> </article> <devsite-content-footer class="nocontent"> <p>Content and code samples on this page are subject to the licenses described in the <a href="/license">Content License</a>. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.</p> <p>Last updated 2023-04-12 UTC.</p> </devsite-content-footer> <devsite-notification > </devsite-notification> <div class="devsite-content-data"> <template class="devsite-content-data-template"> [[["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 2023-04-12 UTC."],[],[]] </template> </div> </devsite-content> </main> <devsite-footer-promos class="devsite-footer"> <nav class="devsite-footer-promos nocontent" aria-label="Promotions"> <ul class="devsite-footer-promos-list"> <li class="devsite-footer-promo"> <a href="//x.com/AndroidDev" class="devsite-footer-promo-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer X Promo" > <picture> <source class="devsite-dark-theme" srcset="https://developer.android.com/_static/android/images/logo-x_dt.svg" media="(prefers-color-scheme: dark)" loading="lazy" alt="X"> <img class="devsite-footer-promo-icon" src="/_static/android/images/logo-x.svg" loading="lazy" alt="X"> </picture> <span class="devsite-footer-promo-label"> X </span> </a> <div class="devsite-footer-promo-description">Follow @AndroidDev on X</div> </li> <li class="devsite-footer-promo"> <a href="//www.youtube.com/user/androiddevelopers" class="devsite-footer-promo-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer YouTube Promo" > <picture> <source class="devsite-dark-theme" srcset="https://developer.android.com/_static/android/images/logo-youtube_dt.svg" media="(prefers-color-scheme: dark)" loading="lazy" alt="YouTube"> <img class="devsite-footer-promo-icon" src="//www.gstatic.com/images/icons/material/product/2x/youtube_48dp.png" loading="lazy" alt="YouTube"> </picture> <span class="devsite-footer-promo-label"> YouTube </span> </a> <div class="devsite-footer-promo-description">Check out Android Developers on YouTube</div> </li> <li class="devsite-footer-promo"> <a href="//www.linkedin.com/showcase/androiddev" class="devsite-footer-promo-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer LinkedIn Promo" > <picture> <source class="devsite-dark-theme" srcset="https://developer.android.com/_static/android/images/logo-linkedin_dt.svg" media="(prefers-color-scheme: dark)" loading="lazy" alt="LinkedIn"> <img class="devsite-footer-promo-icon" src="/_static/android/images/logo-linkedin.svg" loading="lazy" alt="LinkedIn"> </picture> <span class="devsite-footer-promo-label"> LinkedIn </span> </a> <div class="devsite-footer-promo-description">Connect with the Android Developers community on LinkedIn</div> </li> </ul> </nav> </devsite-footer-promos> <devsite-footer-linkboxes class="devsite-footer"> <nav class="devsite-footer-linkboxes nocontent" aria-label="Footer links"> <ul class="devsite-footer-linkboxes-list"> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">More Android</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="//www.android.com" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > Android </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//www.android.com/enterprise/" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > Android for Enterprise </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//www.android.com/security-center/" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)" > Security </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//source.android.com" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)" > Source </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/news" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 5)" > News </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//android-developers.googleblog.com/" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 6)" > Blog </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/podcasts" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 7)" > Podcasts </a> </li> </ul> </li> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Discover</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="/games" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > Gaming </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/ml" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > Machine Learning </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/health-and-fitness" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)" > Health & Fitness </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/media" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)" > Camera & Media </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/privacy" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 5)" > Privacy </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/training/connectivity/5g" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 6)" > 5G </a> </li> </ul> </li> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Android Devices</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="/large-screens" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > Large screens </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/wear" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > Wear OS </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/chrome-os" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)" > ChromeOS devices </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/cars" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)" > Android for cars </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/tv" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 5)" > Android TV </a> </li> </ul> </li> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Releases</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="/about/versions/15" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > Android 15 </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/about/versions/14" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > Android 14 </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/about/versions/13" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)" > Android 13 </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/about/versions/12" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)" > Android 12 </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/about/versions/11" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 5)" > Android 11 </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/about/versions/10" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 6)" > Android 10 </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/about/versions/pie" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 7)" > Pie </a> </li> </ul> </li> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Documentation and Downloads</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="/studio/intro" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > Android Studio guide </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/guide" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > Developers guides </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/reference" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)" > API reference </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/studio" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)" > Download Studio </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/ndk" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 5)" > Android NDK </a> </li> </ul> </li> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Support</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="//issuetracker.google.com/issues/new?component=190923&template=841312" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > Report platform bug </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//issuetracker.google.com/issues/new?component=192697" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > Report documentation bug </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//support.google.com/googleplay/android-developer" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)" > Google Play support </a> </li> <li class="devsite-footer-linkbox-item"> <a href="https://g.co/userresearch/androiddeveloperfooter" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)" > Join research studies </a> </li> </ul> </li> </ul> </nav> </devsite-footer-linkboxes> <devsite-footer-utility class="devsite-footer"> <div class="devsite-footer-utility nocontent"> <nav class="devsite-footer-sites" aria-label="Other Google Developers websites"> <a href="https://developers.google.com/" class="devsite-footer-sites-logo-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Google Developers Link"> <picture> <source srcset="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/lockup-google-for-developers-dark-theme.svg" media="(prefers-color-scheme: none)" class="devsite-dark-theme" loading="lazy" alt="Google Developers"> <img class="devsite-footer-sites-logo" src="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/lockup-google-for-developers.svg" loading="lazy" alt="Google Developers"> </picture> </a> <ul class="devsite-footer-sites-list"> <li class="devsite-footer-sites-item"> <a href="//developer.android.com" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Android Link" > Android </a> </li> <li class="devsite-footer-sites-item"> <a href="//developer.chrome.com/home" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Chrome Link" > Chrome </a> </li> <li class="devsite-footer-sites-item"> <a href="//firebase.google.com" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Firebase Link" > Firebase </a> </li> <li class="devsite-footer-sites-item"> <a href="//cloud.google.com" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Google Cloud Platform Link" > Google Cloud Platform </a> </li> <li class="devsite-footer-sites-item"> <a href="//developers.google.com/products/" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer All products Link" > All products </a> </li> </ul> </nav> <nav class="devsite-footer-utility-links" aria-label="Utility links"> <ul class="devsite-footer-utility-list"> <li class="devsite-footer-utility-item "> <a class="devsite-footer-utility-link gc-analytics-event" href="//policies.google.com/privacy" data-category="Site-Wide Custom Events" data-label="Footer Privacy link" > Privacy </a> </li> <li class="devsite-footer-utility-item "> <a class="devsite-footer-utility-link gc-analytics-event" href="/license" data-category="Site-Wide Custom Events" data-label="Footer License link" > License </a> </li> <li class="devsite-footer-utility-item "> <a class="devsite-footer-utility-link gc-analytics-event" href="/distribute/marketing-tools/brand-guidelines" data-category="Site-Wide Custom Events" data-label="Footer Brand guidelines link" > Brand guidelines </a> </li> <li class="devsite-footer-utility-item glue-cookie-notification-bar-control"> <a class="devsite-footer-utility-link gc-analytics-event" href="#" data-category="Site-Wide Custom Events" data-label="Footer Manage cookies link" aria-hidden="true" > Manage cookies </a> </li> <li class="devsite-footer-utility-item devsite-footer-utility-button"> <span class="devsite-footer-utility-description">Get news and tips by email</span> <a class="devsite-footer-utility-link gc-analytics-event" href="/updates" data-category="Site-Wide Custom Events" data-label="Footer Subscribe link" > Subscribe </a> </li> </ul> <devsite-language-selector> <ul role="presentation"> <li role="presentation"> <a role="menuitem" lang="en" >English</a> </li> <li role="presentation"> <a role="menuitem" lang="de" >Deutsch</a> </li> <li role="presentation"> <a role="menuitem" lang="es_419" >Español – América Latina</a> </li> <li role="presentation"> <a role="menuitem" lang="fr" >Français</a> </li> <li role="presentation"> <a role="menuitem" lang="id" >Indonesia</a> </li> <li role="presentation"> <a role="menuitem" lang="it" >Italiano</a> </li> <li role="presentation"> <a role="menuitem" lang="pl" >Polski</a> </li> <li role="presentation"> <a role="menuitem" lang="pt_br" >Português – Brasil</a> </li> <li role="presentation"> <a role="menuitem" lang="vi" >Tiếng Việt</a> </li> <li role="presentation"> <a role="menuitem" lang="tr" >Türkçe</a> </li> <li role="presentation"> <a role="menuitem" lang="ru" >Русский</a> </li> <li role="presentation"> <a role="menuitem" lang="he" >עברית</a> </li> <li role="presentation"> <a role="menuitem" lang="ar" >العربيّة</a> </li> <li role="presentation"> <a role="menuitem" lang="fa" >فارسی</a> </li> <li role="presentation"> <a role="menuitem" lang="hi" >हिंदी</a> </li> <li role="presentation"> <a role="menuitem" lang="bn" >বাংলা</a> </li> <li role="presentation"> <a role="menuitem" lang="th" >ภาษาไทย</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_cn" >中文 – 简体</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_tw" >中文 – 繁體</a> </li> <li role="presentation"> <a role="menuitem" lang="ja" >日本語</a> </li> <li role="presentation"> <a role="menuitem" lang="ko" >한국어</a> </li> </ul> </devsite-language-selector> </nav> </div> </devsite-footer-utility> <devsite-panel></devsite-panel> </section></section> <devsite-sitemask></devsite-sitemask> <devsite-snackbar></devsite-snackbar> <devsite-tooltip ></devsite-tooltip> <devsite-heading-link></devsite-heading-link> <devsite-analytics> <script type="application/json" analytics>[]</script> <script type="application/json" tag-management>{"at": "True", "ga4": [{"id": "G-QFRN08RN6E", "purpose": 0}], "ga4p": [{"id": "G-QFRN08RN6E", "purpose": 0}], "gtm": [{"id": "GTM-KMSWPCJ", "purpose": 0}], "parameters": {"internalUser": "False", "language": {"machineTranslated": "False", "requested": "en", "served": "en"}, "pageType": "article", "projectName": "Android Studio", "signedIn": "False", "tenant": "android", "recommendations": {"sourcePage": "", "sourceType": 0, "sourceRank": 0, "sourceIdenticalDescriptions": 0, "sourceTitleWords": 0, "sourceDescriptionWords": 0, "experiment": ""}, "experiment": {"ids": ""}}}</script> </devsite-analytics> <devsite-badger></devsite-badger> <android-fully-clickable target=" .android-case-study .devsite-landing-row-item, .android-grouped-resources .devsite-landing-row-item, .android-grouped-resources-primary .devsite-landing-row-item, .android-grouped-resources-secondary .devsite-landing-row-item, .android-guide-cards .devsite-landing-row-item, .android-illustrated-resources-index .devsite-landing-row-item, .android-illustrated-resources-primary .devsite-landing-row-item, .android-illustrated-resources-secondary .devsite-landing-row-item, .android-illustrated-resources-secondary-small .devsite-landing-row-item, .android-illustrated-resources-tertiary .devsite-landing-row-item, .android-illustrated-resources-tertiary-small .devsite-landing-row-item, .android-promo .devsite-landing-row-item, .android-quick-link, .android-samples .devsite-card-wrapper, .fully-clickable" watch=".android-samples, devsite-content"></android-fully-clickable> <script nonce="GJtAqivlLhGKTC+KhDaDeVvI8Po2sy"> (function(d,e,v,s,i,t,E){d['GoogleDevelopersObject']=i; t=e.createElement(v);t.async=1;t.src=s;E=e.getElementsByTagName(v)[0]; E.parentNode.insertBefore(t,E);})(window, document, 'script', 'https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/js/app_loader.js', '[3,"en",null,"/js/devsite_app_module.js","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android","https://android-dot-devsite-v2-prod.appspot.com",null,null,["/_pwa/android/manifest.json","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/images/video-placeholder.svg","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/favicon.svg","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/lockup.svg","https://fonts.googleapis.com/css?family=Google+Sans:400,500,600,700|Google+Sans+Text:400,400italic,500,500italic,600,600italic,700,700italic|Roboto+Mono:400,500,700&display=swap"],1,null,[1,6,8,12,14,17,21,25,50,52,63,70,75,76,80,87,91,92,93,97,98,100,101,102,103,104,105,107,108,109,110,112,113,116,117,118,120,122,124,125,126,127,129,130,131,132,133,134,135,136,138,140,141,147,148,149,151,152,156,157,158,159,161,163,164,168,169,170,179,180,182,183,186,191,193,196],"AIzaSyAP-jjEJBzmIyKR4F-3XITp8yM9T1gEEI8","AIzaSyB6xiKGDR5O3Ak2okS4rLkauxGUG7XP0hg","developer.android.com","AIzaSyAQk0fBONSGUqCNznf6Krs82Ap1-NV6J4o","AIzaSyCCxcqdrZ_7QMeLCRY20bh_SXdAYqy70KY",null,null,null,["Profiles__enable_public_developer_profiles","Profiles__require_profile_eligibility_for_signin","Cloud__enable_free_trial_server_call","Profiles__enable_profile_collections","Search__enable_page_map","MiscFeatureFlags__enable_dark_theme","Analytics__enable_clearcut_logging","MiscFeatureFlags__enable_view_transitions","MiscFeatureFlags__enable_explain_this_code","EngEduTelemetry__enable_engedu_telemetry","Cloud__enable_cloud_dlp_service","Significatio__enable_by_tenant","Profiles__enable_completecodelab_endpoint","Cloud__enable_cloud_facet_chat","MiscFeatureFlags__enable_project_variables","MiscFeatureFlags__developers_footer_image","Profiles__enable_page_saving","CloudShell__cloud_shell_button","Search__enable_ai_eligibility_checks","Search__enable_dynamic_content_confidential_banner","Profiles__enable_developer_profiles_callout","Search__enable_suggestions_from_borg","Cloud__enable_cloudx_ping","Search__enable_ai_search_summaries","TpcFeatures__enable_mirror_tenant_redirects","Cloud__enable_cloud_shell_fte_user_flow","CloudShell__cloud_code_overflow_menu","Experiments__reqs_query_experiments","DevPro__enable_developer_subscriptions","MiscFeatureFlags__enable_variable_operator","Profiles__enable_recognition_badges","DevPro__enable_cloud_innovators_plus","Profiles__enable_release_notes_notifications","Profiles__enable_complete_playlist_endpoint","Cloud__enable_cloud_shell","Concierge__enable_pushui","Profiles__enable_awarding_url","MiscFeatureFlags__developers_footer_dark_image","MiscFeatureFlags__emergency_css","BookNav__enable_tenant_cache_key","Profiles__enable_dashboard_curated_recommendations","Cloud__enable_legacy_calculator_redirect","TpcFeatures__enable_required_headers","Cloud__enable_cloudx_experiment_ids","MiscFeatureFlags__enable_firebase_utm","Cloud__enable_llm_concierge_chat"],null,null,"AIzaSyBLEMok-5suZ67qRPzx0qUtbnLmyT_kCVE","https://developerscontentserving-pa.googleapis.com","AIzaSyCM4QpTRSqP5qI4Dvjt4OAScIN8sOUlO-k","https://developerscontentsearch-pa.googleapis.com",2,4,null,"https://developerprofiles-pa.googleapis.com",[3,"android","Android Developers","developer.android.com",null,"android-dot-devsite-v2-prod.appspot.com",null,null,[null,1,null,null,null,null,null,null,null,null,null,[1],null,null,null,null,null,null,[1],[1,null,null,[1,20],"/recommendations"],null,null,null,[1,null,1],[1,1,null,1,1]],null,[18,null,null,null,null,null,"/images/lockup.svg","/images/touchicon-180.png",null,null,null,null,null,null,null,null,null,null,null,null,null,1,null,null,null,"/images/lockup-dark-theme.svg",[]],[],null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[6,1,14,15,20,22,23,28,29,37,43],null,[[null,null,1],[1,1]],[[null,null,null,null,null,null,null,[["G-QFRN08RN6E"],null,null,[["G-QFRN08RN6E",1]]],null,null,null,null,1],null,[[1,1],[2,2]]],null,4,null,null,null,null,null,null,null,null,null,null,null,null,null,"android.devsite.google"],null,"pk_live_5170syrHvgGVmSx9sBrnWtA5luvk9BwnVcvIi7HizpwauFG96WedXsuXh790rtij9AmGllqPtMLfhe2RSwD6Pn38V00uBCydV4m"]') </script> <devsite-a11y-announce></devsite-a11y-announce> </body> </html>