- syntax:
-
<uses-native-library android:name="string" android:required=["true" | "false"] />
- contained in:
-
<application>
- description:
-
Specifies a vendor-provided shared native library that the application must be linked against. This element tells the system to make the native library accessible for the package.
NDK libraries are by default accessible and therefore don't require the
<uses-native-library>
tag.Non-NDK native shared libraries that are provided by silicon vendors or device manufacturers aren't accessible by default if the app targets Android 12 (API level 31) or higher. The libraries are accessible only when they are explicitly requested using the
<uses-native-library>
tag.If the app targets Android 11 (API level 30) or lower, the
<uses-native-library>
tag isn't required. In that case, any native shared library is accessible regardless of whether it is an NDK library.This element also affects the installation of the application on a particular device. If this element is present and its
android:required
attribute is set totrue
, thePackageManager
framework won't let a user install the application unless the library is present on the user's device.The
android:required
attribute is described in detail in the following section. - attributes:
-
android:name
- The name of the library file.
android:required
-
Boolean value that indicates whether the application requires the
library specified by
android:name
.-
"true"
: the application doesn't function without this library. The system doesn't let the application install on a device that doesn't have the library. -
"false"
: the application uses the library if present, but is designed to function without it if necessary. The system lets the application install, even if the library isn't present. If you use"false"
, you are responsible for gracefully handling the absence of the library.
The default is
"true"
. -
- introduced in:
- API level 31
- see also:
CARVIEW |
Select Language
HTTP/2 302
content-type: text/html; charset=utf-8
location: https://developer.android.com/oauth2authorize?return_url=https%3A%2F%2Fdeveloper.android.com%2Fguide%2Ftopics%2Fmanifest%2Fuses-native-library-element&prompt=none&auto_signin=True&scopes=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdeveloperprofiles+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdeveloperprofiles.award
x-robots-tag: noindex
set-cookie: signin_details="Check Login State: Current Auto Sign in Status :Skip AutoSignin False: Skip Signin False: Auto signin the user - Oauth Sign in: Called Signin(): SignIn Redirect"; Expires=Thu, 17 Jul 2025 03:23:17 GMT; Max-Age=300; Secure; Path=/
set-cookie: signin=autosignin; Expires=Thu, 17 Jul 2025 03:23:17 GMT; Max-Age=300; Secure; Path=/
set-cookie: signin_details="Check Login State: Current Auto Sign in Status :Skip AutoSignin False: Skip Signin False: Auto signin the user - Oauth Sign in: Called Signin(): SignIn RedirectSetting SignInCookie - AutoSignin: "; Expires=Thu, 17 Jul 2025 03:23:17 GMT; Max-Age=300; Secure; Path=/
set-cookie: session=; Expires=Thu, 01 Jan 1970 00:00:00 GMT; Max-Age=0; Secure; HttpOnly; Path=/; SameSite=None
vary: Cookie
vary: Accept-Encoding
content-security-policy: base-uri 'self'; object-src 'none'; script-src 'strict-dynamic' 'unsafe-inline' https: http: 'nonce-MQF2XvmNKhJSKXltaK17pTEoFNoQtz' 'unsafe-eval'; frame-ancestors 'self' https://developers.google.com/_d/analytics-iframe; report-uri https://csp.withgoogle.com/csp/devsite/v2
strict-transport-security: max-age=63072000; includeSubdomains; preload
x-xss-protection: 0
x-content-type-options: nosniff
cache-control: no-cache, must-revalidate
expires: 0
pragma: no-cache
content-encoding: gzip
x-cloud-trace-context: a0694a72e05b91490ef290d16887c2f9
date: Thu, 17 Jul 2025 03:18:17 GMT
server: Google Frontend
content-length: 326
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
HTTP/2 302
content-type: text/html; charset=utf-8
location: https://accounts.google.com/o/oauth2/v2/auth?client_id=721724668570-nbkv1cfusk7kk4eni4pjvepaus73b13t.apps.googleusercontent.com&redirect_uri=https%3A%2F%2Fdeveloper.android.com%2Foauth2callback&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgoogledevelopers+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdeveloperprofiles+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdeveloperprofiles.award+openid&access_type=online&response_type=code&state=%7B%22csrf_token%22%3A+%22671731df8a5c170636ebd40d4312e9ad01a6eb532da12241175d85c314c61b86%22%2C+%22return_url%22%3A+%22https%3A%2F%2Fdeveloper.android.com%2Fguide%2Ftopics%2Fmanifest%2Fuses-native-library-element%22%7D&prompt=none&auto_signin=True
set-cookie: signin_details="Check Login State: Current Auto Sign in Status :Skip AutoSignin False: Skip Signin False: Auto signin the user - Oauth Sign in: Called Signin(): SignIn RedirectSetting SignInCookie - AutoSignin: Start_Oauth(): Start Oauth Prompt - none: "; Expires=Thu, 17 Jul 2025 03:23:18 GMT; Max-Age=300; Secure; Path=/
set-cookie: session=.eJylVF2TqjgQ_Stbvu4-QBBH5k1UEEaYGlQ-8jJFEhUwQXYU-bh1__vt6Dhrbd2HnVqqUgWh031yzun-MXivth8iLbflefB8_qi3fw32x-Oeb9-PaX3O0Ds9fezez8fDthw8D0ZP6pOmst041an6pIy00ZawocKGmoq2RsoUNYUdXUMsVREaquqTzsY61dQhHalkPBr8O_uOH5v3_531-cfgDwLw9pNVmO_fJrdn6lnIyFgcHD3hn9IorJk1VuJ-UieorXCkK9xp1mvFUpm970IU5hsUdkyEXSDaC9NXaz4VJl-gzYvTuPczMeIHPvcdv3daWIpfJEN_TZtlpOeplrQJwipFJy1FJwXiK39h_g05myQOe7_3c2_tK0thNXTh1RgZF4xazmKfU-FfSBlwUr4BPuMM2PyvmprPE83lzA1m9oxHVOMaswM7ET5ii2rI1H27QvzNU7Mi1VeeGfsF0UzOrb05ATrSRaBAvdGyMzSm0a-6SWxWtNMLgpQL4FPSqVESBMsODzjGnNhGg2O3d-xMYQuzf83HFwYZloJdCGInHFlNGntXvEt05fFyuwuvsRjXOFKzNGr236gP3IVdGumCdHpDhSHSqOXfqY_tEOGovVA77OjCvWDBTzj2voPh8e5fGCAmY8jq8NSUues0Wm2KSdvhKKioCAtmAXYhNsW0PbJF0ND-eFmigIP2J6kFzfWMiKAj4J-l1Hpl3OrN3CKJ2lMirKt2U_AeRryOUVaRcrVZH5uXK6fcyDACD7vBazHJrr6ONeAKr7zlAz9JJLWHuAd_3est7_2QGwjW9R185jLb-ACf7VjsVvBdPHD1idH5LV-3cyPgoeqAs0uKwnuOw3_NAdwhgs4czrxI7dLI5_d7vUT_3Ivc9O1-r73kmRd4ZUDOQOZ6vd_p6iX1rg170ObOhX73fEZt3n9ypUhM5OrjPzeFGVxjieZWW2EpaWRIfXgSBZxWUo9wR-1zgfHKLSbqFUOsYdkH4J2w4_ORZ5ZmRoV1pnpg8GnuTZFVJCjsqWoo29iUmG2CdJhTunz3gZee2kZNJacL3kBuz7R98HcEfIc9sy1F7p20U55ofof5J-bcGTlTB_n9XPN664CLLPMjD2bVBHk95ol4UzwbVj_v8JpneDZpkzXsF5veE0HmrZ3On80hPjy8zsIC4pSkh7lW7JGTN3unhDm0CDvCJadN_ppP8getH3rHqZNIP0D_VHh60xprYYXtjfRNAzr3S6RCT3CBY5iJWthDn56J5BdyLKO2Sko3o-XhDP3MiZzfU9eQPMm-JrEp5_ecCKOWPEyv_jB2FPFS6ib_hQtXxThQWeTUg58_fwERjlTb.aHhreg.BMfMgzZBsqB2IhLw_P9WzpqPf4A; Expires=Sun, 17 Aug 2025 03:18:18 GMT; Secure; HttpOnly; Path=/; SameSite=None
vary: Cookie
vary: Accept-Encoding
content-security-policy: base-uri 'self'; object-src 'none'; script-src 'strict-dynamic' 'unsafe-inline' https: http: 'nonce-hXsE+wcN9xNI5KHZvrDl5ohv/kqoKi' 'unsafe-eval'; frame-ancestors 'self' https://developers.google.com/_d/analytics-iframe; report-uri https://csp.withgoogle.com/csp/devsite/v2
strict-transport-security: max-age=63072000; includeSubdomains; preload
x-xss-protection: 0
x-content-type-options: nosniff
cache-control: no-cache, must-revalidate
expires: 0
pragma: no-cache
content-encoding: gzip
x-cloud-trace-context: 68cbc7ae925a606f0ef290d16887c8ba
date: Thu, 17 Jul 2025 03:18:18 GMT
server: Google Frontend
content-length: 561
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
HTTP/2 302
content-type: text/html; charset=UTF-8
set-cookie: __Host-GAPS=1:Z3_JWXHNVGYzgrUykuOkFKMNP_UAiw:v-iNxrHgHtfZreHa;Path=/;Expires=Sat, 17-Jul-2027 03:18:18 GMT;Secure;HttpOnly;Priority=HIGH
cache-control: no-cache, no-store, max-age=0, must-revalidate
pragma: no-cache
expires: Mon, 01 Jan 1990 00:00:00 GMT
date: Thu, 17 Jul 2025 03:18:18 GMT
location: https://developer.android.com/oauth2callback?state=%7B%22csrf_token%22%3A+%22671731df8a5c170636ebd40d4312e9ad01a6eb532da12241175d85c314c61b86%22%2C+%22return_url%22%3A+%22https%3A%2F%2Fdeveloper.android.com%2Fguide%2Ftopics%2Fmanifest%2Fuses-native-library-element%22%7D&error_subtype=access_denied&error=interaction_required
origin-trial: Ajo6ZZxoPufZZ6x0UgjawhB/adBJ+tLG7aX1MO8kWVCTHdOVSlY4OjhBhzivzulNh6ikNKRnwxwK18EvUu6aOgcAAABteyJvcmlnaW4iOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb206NDQzIiwiZmVhdHVyZSI6IldlYlZpZXdYUmVxdWVzdGVkV2l0aERlcHJlY2F0aW9uIiwiZXhwaXJ5IjoxNzU4MDY3MTk5fQ==
strict-transport-security: max-age=31536000; includeSubDomains
report-to: {"group":"coop_gse_qebhlk","max_age":2592000,"endpoints":[{"url":"https://csp.withgoogle.com/csp/report-to/gse_qebhlk"}]}
cross-origin-opener-policy-report-only: same-origin; report-to="coop_gse_qebhlk"
content-security-policy: script-src 'report-sample' 'nonce-HJ5LqaGtAtC_1qyOaE7Gfw' 'unsafe-inline' 'unsafe-eval';object-src 'none';base-uri 'self';report-uri /cspreport
content-security-policy: require-trusted-types-for 'script';report-uri /cspreport
content-encoding: gzip
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
content-length: 394
server: GSE
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
HTTP/2 302
content-type: text/html; charset=utf-8
location: https://developer.android.com/guide/topics/manifest/uses-native-library-element
set-cookie: signin_details="Check Login State: Current Auto Sign in Status :Skip AutoSignin False: Skip Signin False: Auto signin the user - Oauth Sign in: Called Signin(): SignIn RedirectSetting SignInCookie - AutoSignin: Start_Oauth(): Start Oauth Prompt - none: Called Oauth2Callback(): Oauth2Callback callback view: Oauth2Callback No User creds: Oauth2Callback error:no_credentials:bad_request:Authorization failed: interaction_required: Oauth2Callback AS_state autosignin: "; Expires=Thu, 17 Jul 2025 03:23:19 GMT; Max-Age=300; Secure; Path=/
set-cookie: signin_details=; Expires=Thu, 01 Jan 1970 00:00:00 GMT; Max-Age=0; Path=/
set-cookie: session=eyJfcGVybWFuZW50Ijp0cnVlfQ.aHhrew.AMW45uw6yPuhyAyOQW8NqozrMtc; Expires=Sun, 17 Aug 2025 03:18:19 GMT; Secure; HttpOnly; Path=/; SameSite=None
vary: Cookie
vary: Accept-Encoding
content-security-policy: base-uri 'self'; object-src 'none'; script-src 'strict-dynamic' 'unsafe-inline' https: http: 'nonce-IuvVXwFZ8s25tJInVYnCohT8vBmuOy' 'unsafe-eval'; frame-ancestors 'self' https://developers.google.com/_d/analytics-iframe; report-uri https://csp.withgoogle.com/csp/devsite/v2
strict-transport-security: max-age=63072000; includeSubdomains; preload
x-xss-protection: 0
x-content-type-options: nosniff
cache-control: no-cache, must-revalidate
expires: 0
pragma: no-cache
content-encoding: gzip
x-cloud-trace-context: d2f41be00880ff1b0ef290d16887c209
date: Thu, 17 Jul 2025 03:18:19 GMT
server: Google Frontend
content-length: 212
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
HTTP/2 200
last-modified: Mon, 07 Jul 2025 15:45:41 GMT
content-type: text/html; charset=utf-8
vary: Cookie
vary: Accept-Encoding
set-cookie: session=eyJfcGVybWFuZW50Ijp0cnVlfQ.aHhrew.AMW45uw6yPuhyAyOQW8NqozrMtc; Expires=Sun, 17 Aug 2025 03:18:19 GMT; Secure; HttpOnly; Path=/; SameSite=None
content-security-policy: base-uri 'self'; object-src 'none'; script-src 'strict-dynamic' 'unsafe-inline' https: http: 'nonce-k0JgP74iR9jZpvo7FXPjyLNMnIxKPS' 'unsafe-eval'; frame-ancestors 'self' https://developers.google.com/_d/analytics-iframe; report-uri https://csp.withgoogle.com/csp/devsite/v2
strict-transport-security: max-age=63072000; includeSubdomains; preload
x-xss-protection: 0
x-content-type-options: nosniff
cache-control: no-cache, must-revalidate
expires: 0
pragma: no-cache
content-encoding: gzip
x-cloud-trace-context: 02bb6104327eb0200ef290d16887c72a
date: Thu, 17 Jul 2025 03:18:19 GMT
server: Google Frontend
content-length: 30693
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
<uses-native-library> | App architecture | Android Developers
Skip to main content
<uses-native-library>
<uses-native-library>
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-07-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-07 UTC."],[],[]]