CINXE.COM
Android NDK | Android Developers
<!doctype html> <html lang="en" dir="ltr"> <head><script type="text/javascript" src="/_static/js/bundle-playback.js?v=HxkREWBo" charset="utf-8"></script> <script type="text/javascript" src="/_static/js/wombat.js?v=txqj7nKC" charset="utf-8"></script> <script>window.RufflePlayer=window.RufflePlayer||{};window.RufflePlayer.config={"autoplay":"on","unmuteOverlay":"hidden"};</script> <script type="text/javascript" src="/_static/js/ruffle/ruffle.js"></script> <script type="text/javascript"> __wm.init("https://web.archive.org/web"); __wm.wombat("https://developer.android.com/ndk","20230328101221","https://web.archive.org/","web","/_static/", "1679998341"); </script> <link rel="stylesheet" type="text/css" href="/_static/css/banner-styles.css?v=S1zqJCYt" /> <link rel="stylesheet" type="text/css" href="/_static/css/iconochive.css?v=3PDvdIFv" /> <!-- End Wayback Rewrite JS Include --> <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 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="/web/20230328101221/https://developer.android.com/_pwa/android/manifest.json" crossorigin="use-credentials"> <link rel="preconnect" href="//web.archive.org/web/20230328101221/https://www.gstatic.com/" crossorigin> <link rel="preconnect" href="//web.archive.org/web/20230328101221/https://fonts.gstatic.com/" crossorigin> <link rel="preconnect" href="//web.archive.org/web/20230328101221/https://fonts.googleapis.com/" crossorigin> <link rel="preconnect" href="//web.archive.org/web/20230328101221/https://apis.google.com/" crossorigin> <link rel="preconnect" href="//web.archive.org/web/20230328101221/https://www.google-analytics.com/" crossorigin><link rel="stylesheet" href="//web.archive.org/web/20230328101221cs_/https://fonts.googleapis.com/css?family=Roboto:300,400,400italic,500,500italic,700,700italic|Roboto+Mono:400,500,700&display=swap"> <link rel="stylesheet" href="//web.archive.org/web/20230328101221cs_/https://fonts.googleapis.com/css2?family=Material+Icons&family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block"><link rel="stylesheet" href="https://web.archive.org/web/20230328101221cs_/https://www.gstatic.com/devrel-devsite/prod/ve286fa3f99aa90bc7ef7460968844e5bb93251ce750a58802f281151c87037d6/android/css/app.css"> <link rel="shortcut icon" href="https://web.archive.org/web/20230328101221im_/https://www.gstatic.com/devrel-devsite/prod/ve286fa3f99aa90bc7ef7460968844e5bb93251ce750a58802f281151c87037d6/android/images/favicon.png"> <link rel="apple-touch-icon" href="https://web.archive.org/web/20230328101221im_/https://www.gstatic.com/devrel-devsite/prod/ve286fa3f99aa90bc7ef7460968844e5bb93251ce750a58802f281151c87037d6/android/images/touchicon-180.png"><link rel="canonical" href="https://web.archive.org/web/20230328101221/https://developer.android.com/ndk"><link rel="search" type="application/opensearchdescription+xml" title="Android Developers" href="https://web.archive.org/web/20230328101221/https://developer.android.com/s/opensearch.xml"> <link rel="alternate" hreflang="en" href="https://web.archive.org/web/20230328101221/https://developer.android.com/ndk"/><link rel="alternate" hreflang="x-default" href="https://web.archive.org/web/20230328101221/https://developer.android.com/ndk"/><link rel="alternate" hreflang="zh-Hans" href="https://web.archive.org/web/20230328101221/https://developer.android.com/ndk?hl=zh-cn"/><link rel="alternate" hreflang="zh-Hant" href="https://web.archive.org/web/20230328101221/https://developer.android.com/ndk?hl=zh-tw"/><link rel="alternate" hreflang="fr" href="https://web.archive.org/web/20230328101221/https://developer.android.com/ndk?hl=fr"/><link rel="alternate" hreflang="id" href="https://web.archive.org/web/20230328101221/https://developer.android.com/ndk?hl=id"/><link rel="alternate" hreflang="ja" href="https://web.archive.org/web/20230328101221/https://developer.android.com/ndk?hl=ja"/><link rel="alternate" hreflang="ko" href="https://web.archive.org/web/20230328101221/https://developer.android.com/ndk?hl=ko"/><link rel="alternate" hreflang="pt-BR" href="https://web.archive.org/web/20230328101221/https://developer.android.com/ndk?hl=pt-br"/><link rel="alternate" hreflang="es-419" href="https://web.archive.org/web/20230328101221/https://developer.android.com/ndk?hl=es-419"/><link rel="alternate" hreflang="vi" href="https://web.archive.org/web/20230328101221/https://developer.android.com/ndk?hl=vi"/><title>Android NDK | Android Developers</title> <meta property="og:title" content="Android NDK | Android Developers"><meta name="description" content="A toolset that lets you implement parts of your app in native code, using languages such as C and C++. "> <meta property="og:description" content="A toolset that lets you implement parts of your app in native code, using languages such as C and C++. "><meta name="description" content="The Android NDK is a toolset that lets you implement parts of your app in native code, using languages such as C and C++. For certain types of apps, this can help you reuse code libraries written in those languages. "><meta property="og:description" content="The Android NDK is a toolset that lets you implement parts of your app in native code, using languages such as C and C++. For certain types of apps, this can help you reuse code libraries written in those languages. "><meta property="og:url" content="https://web.archive.org/web/20230328101221/https://developer.android.com/ndk"><meta property="og:locale" content="en"><script type="application/ld+json"> { "@context": "https://web.archive.org/web/20230328101221/https://schema.org", "@type": "Article", "headline": "Android NDK" } </script> <link rel="stylesheet" href="/web/20230328101221cs_/https://developer.android.com/extras.css"></head> <body class="" template="landing" theme="android-ndk-theme" type="article" layout="full" pending> <devsite-progress type="indeterminate" id="app-progress"></devsite-progress> <section class="devsite-wrapper"><devsite-header> <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="/web/20230328101221/https://developer.android.com/" 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"> <img src="https://web.archive.org/web/20230328101221im_/https://www.gstatic.com/devrel-devsite/prod/ve286fa3f99aa90bc7ef7460968844e5bb93251ce750a58802f281151c87037d6/android/images/lockup.svg" class="devsite-site-logo" alt="Android Developers"> </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> <a href="https://web.archive.org/web/20230328101221/https://developer.android.com/about" track-metadata-eventdetail="https://developer.android.com/about" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - platform" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Platform" track-name="platform"> Platform </a> </tab> <tab> <a href="https://web.archive.org/web/20230328101221/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 - android studio" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Android Studio" track-name="android studio"> Android Studio </a> </tab> <tab> <a href="https://web.archive.org/web/20230328101221/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://web.archive.org/web/20230328101221/https://developer.android.com/jetpack" track-metadata-eventdetail="https://developer.android.com/jetpack" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - jetpack" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Jetpack" track-name="jetpack"> Jetpack </a> </tab> <tab> <a href="https://web.archive.org/web/20230328101221/https://developer.android.com/kotlin" track-metadata-eventdetail="https://developer.android.com/kotlin" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - kotlin" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Kotlin" track-name="kotlin"> Kotlin </a> </tab> <tab active> <a href="https://web.archive.org/web/20230328101221/https://developer.android.com/docs" track-metadata-eventdetail="https://developer.android.com/docs" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - docs" track-metadata-module="primary nav" aria-label="Docs, selected" data-category="Site-Wide Custom Events" data-label="Tab: Docs" track-name="docs"> Docs </a> </tab> <tab> <a href="https://web.archive.org/web/20230328101221/https://developer.android.com/games" track-metadata-eventdetail="https://developer.android.com/games" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - games" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Games" track-name="games"> Games </a> </tab> </nav> </devsite-tabs> </div> <devsite-search aria-expanded="false" aria-haspopup="listbox" enable-signin enable-search enable-suggestions enable-query-completion project-name="Android NDK" tenant-name="Android Developers" role="combobox"> <form class="devsite-search-form" action="https://web.archive.org/web/20230328101221/https://developer.android.com/s/results" method="GET"> <div class="devsite-search-container"> <div class="devsite-searchbox"> <input aria-activedescendant="" aria-autocomplete="list" aria-label="Search" aria-haspopup="false" aria-multiline="false" aria-label="Search box" autocomplete="off" class="devsite-search-field devsite-search-query" name="q" placeholder="Search" role="searchbox" type="text" value=""> <div class="devsite-search-image material-icons" aria-hidden="true"></div> </div> <button type="button" search-open class="devsite-search-button devsite-header-icon-button button-flat material-icons" aria-label="Open search"></button> </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-language-selector> <ul role="presentation"> <li role="presentation"> <a role="menuitem" lang="en">English</a> </li> <li role="presentation"> <a role="menuitem" lang="id">Bahasa Indonesia</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="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="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://web.archive.org/web/20230328101221/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://web.archive.org/web/20230328101221/https://developer.android.com/docs" 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=""> Documentation </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 active> <a href="https://web.archive.org/web/20230328101221/https://developer.android.com/ndk" track-metadata-eventdetail="https://developer.android.com/ndk" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - overview" track-metadata-module="primary nav" aria-label="Overview, selected" data-category="Site-Wide Custom Events" data-label="Tab: Overview" track-name="overview"> Overview </a> </tab> <tab> <a href="https://web.archive.org/web/20230328101221/https://developer.android.com/ndk/downloads" track-metadata-eventdetail="https://developer.android.com/ndk/downloads" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - downloads" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Downloads" track-name="downloads"> Downloads </a> </tab> <tab> <a href="https://web.archive.org/web/20230328101221/https://developer.android.com/ndk/samples" track-metadata-eventdetail="https://developer.android.com/ndk/samples" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - samples" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Samples" track-name="samples"> Samples </a> </tab> <tab> <a href="https://web.archive.org/web/20230328101221/https://developer.android.com/ndk/guides" track-metadata-eventdetail="https://developer.android.com/ndk/guides" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - guides" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Guides" track-name="guides"> Guides </a> </tab> <tab> <a href="https://web.archive.org/web/20230328101221/https://developer.android.com/ndk/reference" track-metadata-eventdetail="https://developer.android.com/ndk/reference" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - reference" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Reference" track-name="reference"> Reference </a> </tab> </nav> </devsite-tabs> </div> </div> </div> </div> </devsite-header> <devsite-book-nav scrollbars hidden> <div class="devsite-book-nav-filter hidden"> <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="/web/20230328101221/https://developer.android.com/" 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"> <img src="https://web.archive.org/web/20230328101221im_/https://www.gstatic.com/devrel-devsite/prod/ve286fa3f99aa90bc7ef7460968844e5bb93251ce750a58802f281151c87037d6/android/images/lockup.svg" class="devsite-site-logo" alt="Android Developers"> </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="/web/20230328101221/https://developer.android.com/about" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Platform" track-name="platform" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Platform" track-type="globalNav" track-metadata-eventdetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip> Platform </span> </a> </li> <li class="devsite-nav-item"> <a href="/web/20230328101221/https://developer.android.com/studio" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Android Studio" track-name="android studio" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android Studio" track-type="globalNav" track-metadata-eventdetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip> Android Studio </span> </a> </li> <li class="devsite-nav-item"> <a href="/web/20230328101221/https://developer.android.com/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="/web/20230328101221/https://developer.android.com/jetpack" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Jetpack" track-name="jetpack" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Jetpack" track-type="globalNav" track-metadata-eventdetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip> Jetpack </span> </a> </li> <li class="devsite-nav-item"> <a href="/web/20230328101221/https://developer.android.com/kotlin" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Kotlin" track-name="kotlin" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Kotlin" track-type="globalNav" track-metadata-eventdetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip> Kotlin </span> </a> </li> <li class="devsite-nav-item"> <a href="/web/20230328101221/https://developer.android.com/docs" class="devsite-nav-title gc-analytics-event devsite-nav-active" data-category="Site-Wide Custom Events" data-label="Tab: Docs" track-name="docs" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Docs" track-type="globalNav" track-metadata-eventdetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip> Docs </span> </a> <ul class="devsite-nav-responsive-tabs"> <li class="devsite-nav-item"> <a href="/web/20230328101221/https://developer.android.com/ndk" class="devsite-nav-title gc-analytics-event devsite-nav-active" data-category="Site-Wide Custom Events" data-label="Tab: Overview" track-name="overview" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Overview" track-type="globalNav" 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="/web/20230328101221/https://developer.android.com/ndk/downloads" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Tab: Downloads" track-name="downloads" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Downloads" track-type="globalNav" track-metadata-eventdetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip> Downloads </span> <span class="devsite-nav-icon material-icons" data-icon="forward"> </span> </a> </li> <li class="devsite-nav-item"> <a href="/web/20230328101221/https://developer.android.com/ndk/samples" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Tab: Samples" track-name="samples" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Samples" track-type="globalNav" track-metadata-eventdetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip> Samples </span> <span class="devsite-nav-icon material-icons" data-icon="forward"> </span> </a> </li> <li class="devsite-nav-item"> <a href="/web/20230328101221/https://developer.android.com/ndk/guides" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Tab: Guides" track-name="guides" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Guides" track-type="globalNav" track-metadata-eventdetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip> Guides </span> <span class="devsite-nav-icon material-icons" data-icon="forward"> </span> </a> </li> <li class="devsite-nav-item"> <a href="/web/20230328101221/https://developer.android.com/ndk/reference" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Tab: Reference" track-name="reference" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Reference" track-type="globalNav" track-metadata-eventdetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip> Reference </span> <span class="devsite-nav-icon material-icons" data-icon="forward"> </span> </a> </li> </ul> </li> <li class="devsite-nav-item"> <a href="/web/20230328101221/https://developer.android.com/games" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Games" track-name="games" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Games" track-type="globalNav" 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="/web/20230328101221/https://developer.android.com/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> </nav> </devsite-book-nav> <section id="gc-wrapper"> <main role="main" class="devsite-main-content"> <div class="devsite-sidebar"> <div class="devsite-sidebar-content"> <devsite-toc class="devsite-nav" role="navigation" aria-label="On this page" depth="2" scrollbars disabled></devsite-toc> <devsite-recommendations-sidebar class="nocontent devsite-nav"> </devsite-recommendations-sidebar> </div> </div> <devsite-content> <article class="devsite-article"><style> /* Styles inlined from /assets/css/ndk.css */ .dac-ndk-hero .devsite-landing-row-group { margin-top: 16px !important; } .dac-ndk-hero-code { margin: 0 auto; width: fit-content; } </style> <div class="devsite-article-meta nocontent" role="navigation"> <ul class="devsite-breadcrumb-list" aria-label="Breadcrumb"> <li class="devsite-breadcrumb-item "> <a href="https://web.archive.org/web/20230328101221/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=""> Home </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://web.archive.org/web/20230328101221/https://developer.android.com/ndk" 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="Android NDK"> NDK </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://web.archive.org/web/20230328101221/https://developer.android.com/docs" 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=""> Docs </a> </li> </ul> </div> <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" 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> <devsite-toc class="devsite-nav" depth="2" devsite-toc-embedded disabled> </devsite-toc> <div class="devsite-article-body clearfix "> <section class="devsite-landing-row devsite-landing-row-2-up devsite-landing-row-hero devsite-landing-row-50 devsite-landing-row-large-headings devsite-landing-row-no-image-background android-decorative-media android-hero-index dac-ndk-hero" background="/web/20230328101221im_/https://developer.android.com/navy" header-position="top"> <div class="devsite-landing-row-inner"> <header class="devsite-landing-row-header"> <div class="devsite-landing-row-header-text"> <h2 id="android-ndk" data-text="Android NDK" tabindex="0"> Android NDK </h2> </div> </header> <div class="devsite-landing-row-group"> <div class="devsite-landing-row-item devsite-landing-row-item-no-media" description-position="bottom"> <div class="devsite-landing-row-item-description"> <div class="devsite-landing-row-item-body"> <div class="devsite-landing-row-item-description-content"> The Android NDK is a toolset that lets you implement parts of your app in native code, using languages such as C and C++. For certain types of apps, this can help you reuse code libraries written in those languages. </div> <div class="devsite-landing-row-item-buttons"> <a href="https://web.archive.org/web/20230328101221/https://developer.android.com/ndk/guides" class="button button-primary ">Get started</a> </div> </div> </div> </div> <div class="devsite-landing-row-item devsite-landing-row-item-no-media" description-position="bottom"> <div class="devsite-landing-row-item-description"> <div class="devsite-landing-row-item-body"> <div class="devsite-landing-row-item-description-content"> <div class="dac-ndk-hero-code"> <span style="color:#eee;font-family:'Roboto Mono', monospace;font-size:16px;font-weight:400"> <span style="color:#4dd0e1">class</span> <span style="color:#ce93d8">MyActivity</span> : <span style="color:#ce93d8">Activity</span>() {<br> <span style="color:#f06292"> /**<br> * Native method implemented in C/C++<br> */</span><br> <span style="color:#eceff1">external fun</span> computeFoo()<br> } </span> </div> </div> </div> </div> </div> </div> </div> </section> <section class="devsite-landing-row devsite-landing-row-1-up devsite-landing-row-100 devsite-landing-row-padding-xlarge" header-position="top"> <div class="devsite-landing-row-inner"> <header class="devsite-landing-row-header"> <div class="devsite-landing-row-header-text"> <h2 id="latest-news" data-text="Latest news" tabindex="0"> Latest news </h2> </div> </header> <div class="devsite-landing-row-group"> <div class="devsite-landing-row-item devsite-landing-row-item-no-media" description-position="bottom"> <div class="devsite-landing-row-item-description"> <div class="devsite-landing-row-item-body"> <div class="devsite-landing-row-item-description-content"> <devsite-dynamic-content class="android-editorial-and-updates" fields="image origin title summary date" initial-results="3" items-across="3" maxresults="3" query="origin:blogger+account:android developers+keyword:ndk,origin:medium+keyword:ndk" sortorder="-timestamp"> </devsite-dynamic-content> </div> </div> </div> </div> </div> </div> </section> <section class="devsite-landing-row devsite-landing-row-1-up devsite-landing-row-100 devsite-landing-row-padding-xlarge" header-position="top"> <div class="devsite-landing-row-inner"> <header class="devsite-landing-row-header"> <div class="devsite-landing-row-header-text"> <h2 id="optimize-your-native-code" data-text="Optimize your native code" tabindex="0"> Optimize your native code </h2> </div> </header> <div class="devsite-landing-row-group"> <div class="devsite-landing-row-item devsite-landing-row-item-no-media" description-position="bottom"> <div class="devsite-landing-row-item-description"> <div class="devsite-landing-row-item-body"> <div class="devsite-landing-row-item-description-content"> <devsite-dynamic-content class="android-editorial-and-updates" fields="image origin title summary date" initial-results="3" items-across="3" maxresults="3" query="keyword:collection_ndklandingperf" sortorder="-timestamp"> </devsite-dynamic-content> </div> </div> </div> </div> </div> </div> </section> <devsite-hats-survey class="nocontent" hats-id="onAFgYxTD0kxBYCLVTd0Z41p75CM" listnr-id="5207477"></devsite-hats-survey> </div> </article> <devsite-notification> </devsite-notification> <div class="devsite-content-data"> <template class="devsite-thumb-rating-down-categories"> [{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }] </template> <template class="devsite-thumb-rating-up-categories"> [{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }] </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="//web.archive.org/web/20230328101221/https://twitter.com/AndroidDev" class="devsite-footer-promo-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Twitter Promo"> <img class="devsite-footer-promo-icon" src="/web/20230328101221im_/https://developer.android.com/_static/android/images/logo-twitter.svg" loading="lazy" alt="Twitter"> Twitter </a> <div class="devsite-footer-promo-description">Follow @AndroidDev on Twitter</div> </li> <li class="devsite-footer-promo"> <a href="//web.archive.org/web/20230328101221/https://www.youtube.com/user/androiddevelopers" class="devsite-footer-promo-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer YouTube Promo"> <img class="devsite-footer-promo-icon" src="//web.archive.org/web/20230328101221im_/https://www.gstatic.com/images/icons/material/product/2x/youtube_48dp.png" loading="lazy" alt="YouTube"> YouTube </a> <div class="devsite-footer-promo-description">Check out Android Developers on YouTube</div> </li> <li class="devsite-footer-promo"> <a href="//web.archive.org/web/20230328101221/https://www.linkedin.com/showcase/androiddev" class="devsite-footer-promo-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer LinkedIn Promo"> <img class="devsite-footer-promo-icon" src="/web/20230328101221im_/https://developer.android.com/_static/android/images/logo-linkedin.svg" loading="lazy" alt="LinkedIn"> LinkedIn </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="//web.archive.org/web/20230328101221/https://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="//web.archive.org/web/20230328101221/https://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="//web.archive.org/web/20230328101221/https://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="//web.archive.org/web/20230328101221/https://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="/web/20230328101221/https://developer.android.com/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="//web.archive.org/web/20230328101221/https://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="/web/20230328101221/https://developer.android.com/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="/web/20230328101221/https://developer.android.com/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="/web/20230328101221/https://developer.android.com/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="/web/20230328101221/https://developer.android.com/privacy" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)"> Privacy </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/web/20230328101221/https://developer.android.com/training/connectivity/5g" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)"> 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="/web/20230328101221/https://developer.android.com/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="/web/20230328101221/https://developer.android.com/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="/web/20230328101221/https://developer.android.com/tv" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)"> Android TV </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/web/20230328101221/https://developer.android.com/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="/web/20230328101221/https://developer.android.com/things" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 5)"> Android Things </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/web/20230328101221/https://developer.android.com/chrome-os" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 6)"> Chrome OS devices </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="/web/20230328101221/https://developer.android.com/about/versions/13" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)"> Android 13 </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/web/20230328101221/https://developer.android.com/about/versions/12" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)"> Android 12 </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/web/20230328101221/https://developer.android.com/about/versions/11" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)"> Android 11 </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/web/20230328101221/https://developer.android.com/about/versions/10" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)"> Android 10 </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/web/20230328101221/https://developer.android.com/about/versions/pie" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 5)"> Pie </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/web/20230328101221/https://developer.android.com/about/versions/oreo" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 6)"> Oreo </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/web/20230328101221/https://developer.android.com/about/versions/nougat" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 7)"> Nougat </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="/web/20230328101221/https://developer.android.com/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="/web/20230328101221/https://developer.android.com/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="/web/20230328101221/https://developer.android.com/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="/web/20230328101221/https://developer.android.com/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="/web/20230328101221/https://developer.android.com/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="//web.archive.org/web/20230328101221/https://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="//web.archive.org/web/20230328101221/https://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="//web.archive.org/web/20230328101221/https://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://web.archive.org/web/20230328101221/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://web.archive.org/web/20230328101221/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://web.archive.org/web/20230328101221im_/https://www.gstatic.com/devrel-devsite/prod/ve286fa3f99aa90bc7ef7460968844e5bb93251ce750a58802f281151c87037d6/android/images/lockup-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://web.archive.org/web/20230328101221im_/https://www.gstatic.com/devrel-devsite/prod/ve286fa3f99aa90bc7ef7460968844e5bb93251ce750a58802f281151c87037d6/android/images/lockup-developers.svg" loading="lazy" alt="Google Developers"> </picture> </a> <ul class="devsite-footer-sites-list"> <li class="devsite-footer-sites-item"> <a href="//web.archive.org/web/20230328101221/https://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="//web.archive.org/web/20230328101221/https://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="//web.archive.org/web/20230328101221/https://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="//web.archive.org/web/20230328101221/https://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="//web.archive.org/web/20230328101221/https://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="//web.archive.org/web/20230328101221/https://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="/web/20230328101221/https://developer.android.com/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="/web/20230328101221/https://developer.android.com/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 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="/web/20230328101221/https://developer.android.com/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="id">Bahasa Indonesia</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="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="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 analytics-iframe> <script type="application/json" analytics>[{"dimensions": {"dimension6": "en", "dimension4": "Android NDK", "dimension11": false, "dimension5": "en", "dimension3": false, "dimension1": "Signed out"}, "gaid": "UA-5831155-1", "metrics": {"ratings_count": "metric2", "ratings_value": "metric1"}}]</script> <script type="application/json" tag-management gtm>{"ga4": [], "gtm": ["GTM-KMSWPCJ"], "parameters": {"internalUser": "False", "language": {"machineTranslated": "False", "requested": "en", "served": "en"}, "pageType": "article", "projectName": "Android NDK", "signedIn": "False", "tenant": "android", "recommendations": {"sourcePage": "", "sourceType": 0, "sourceRank": 0, "sourceIdenticalDescriptions": 0, "sourceTitleWords": 0, "sourceDescriptionWords": 0, "experiment": ""}, "experiment": {"ids": ""}}, "tags": ["GTM-KMSWPCJ"]}</script> </devsite-analytics> <devsite-badger></devsite-badger> <android-fully-clickable target=" .android-grouped-resources .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="ScLkRFRu2Y0124YW0CSnWILybSkaV7"> (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://web.archive.org/web/20230328101221/https://www.gstatic.com/devrel-devsite/prod/ve286fa3f99aa90bc7ef7460968844e5bb93251ce750a58802f281151c87037d6/android/js/app_loader.js', '[3,"en",null,"/js/devsite_app_module.js","https://web.archive.org/web/20230328101221/https://www.gstatic.com/devrel-devsite/prod/ve286fa3f99aa90bc7ef7460968844e5bb93251ce750a58802f281151c87037d6","https://web.archive.org/web/20230328101221/https://www.gstatic.com/devrel-devsite/prod/ve286fa3f99aa90bc7ef7460968844e5bb93251ce750a58802f281151c87037d6/android","https://web.archive.org/web/20230328101221/https://android-dot-devsite-v2-prod.appspot.com",1,null,["/_pwa/android/manifest.json","https://web.archive.org/web/20230328101221/https://www.gstatic.com/devrel-devsite/prod/ve286fa3f99aa90bc7ef7460968844e5bb93251ce750a58802f281151c87037d6/images/video-placeholder.svg","https://web.archive.org/web/20230328101221/https://www.gstatic.com/devrel-devsite/prod/ve286fa3f99aa90bc7ef7460968844e5bb93251ce750a58802f281151c87037d6/android/images/favicon.png","https://web.archive.org/web/20230328101221/https://www.gstatic.com/devrel-devsite/prod/ve286fa3f99aa90bc7ef7460968844e5bb93251ce750a58802f281151c87037d6/android/images/lockup.svg","https://web.archive.org/web/20230328101221/https://fonts.googleapis.com/css?family=Roboto:300,400,400italic,500,500italic,700,700italic|Roboto+Mono:400,500,700&display=swap"],1,null,[1,6,8,12,14,17,21,25,40,50,52,63,70,75,76,80,87,91,92,93,97,98,100,101,102,103,104,105,107,108,109,110,111,112,113,115,117,118,120,122,124,125,126,127,129,130,131,132,133,134,135,136,138,140,141,144,147,148,149,150,151,152,154,155,156,157,158,159,161,163,164,165,168,169,170,172,173,179,180,182,183,186,190,191,193,196],"AIzaSyAP-jjEJBzmIyKR4F-3XITp8yM9T1gEEI8","AIzaSyB6xiKGDR5O3Ak2okS4rLkauxGUG7XP0hg","developer.android.com","AIzaSyAQk0fBONSGUqCNznf6Krs82Ap1-NV6J4o","AIzaSyCCxcqdrZ_7QMeLCRY20bh_SXdAYqy70KY",null,null,null,["Search__enable_acl_suggestions","Profiles__enable_profile_notifications_ui","Badges__enable_drag_and_drop_badges","Profiles__enable_profile_collections","SignIn__enable_auto_signin_oauth","Localization__enable_locale_redirects","Search__enable_suggestions_from_borg","Profiles__enable_profile_communities","Profiles__enable_public_developer_profiles","Experiments__enable_experiments","Search__enable_page_map","Cloud__enable_cloud_facet_chat","Cloud__enable_cloud_shell","Significatio__enable_experiment_id_caching","MiscFeatureFlags__enable_footprints_record_views","Cloud__enable_cloudx_experiment_ids","Profiles__enable_developer_profiles_interests","Cloud__enable_cloud_dlp_service","MiscFeatureFlags__emergency_css","Search__enable_devsite_serp","Profiles__enable_page_saving","Experiments__reqs_query_experiments","Cloud__enable_cloud_shell_fte_user_flow","Significatio__enable_by_tenant","MiscFeatureFlags__devpanel_url","Profiles__require_profile_eligibility_for_signin","Badges__enable_hide_badges","Cloud__enable_cloudx_ping","Profiles__enable_developer_profiles_dashboard_recommendations","MiscFeatureFlags__enable_tls_version_for_gaia_calls","BookNav__enable_book_nav_filtering","Search__enable_faceted_search","Profiles__enable_developer_profiles_callout","BookNav__enable_collapsible_book_nav","Badges__enable_delete_badges"]]') </script> <devsite-a11y-announce></devsite-a11y-announce> </body> </html><!-- FILE ARCHIVED ON 10:12:21 Mar 28, 2023 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 15:11:01 Dec 12, 2024. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). --> <!-- playback timings (ms): captures_list: 0.66 exclusion.robots: 0.03 exclusion.robots.policy: 0.018 esindex: 0.012 cdx.remote: 9.865 LoadShardBlock: 351.17 (3) PetaboxLoader3.datanode: 366.431 (4) PetaboxLoader3.resolve: 155.806 (2) load_resource: 265.749 -->