page.title=Support for 64-bit x86 @jd:body

On this page

  1. Overview
  2. Standalone Toolchain
  3. Compatibilty

The Android NDK supports the {@code x86_64} ABI. This ABI allows native code to run on Android-based devices using CPUs that support the 64-bit x86 instruction set.

Overview

To generate 64-bit machine code for x86, add {@code x86_64} to the {@code APP_ABI} definition in your {@code Application.mk} file. For example:

APP_ABI := x86_64
For more information on how to specify values for {@code APP_ABI}, see Application.mk.

The build system places libraries generated for the {@code x86_64} ABI into {@code $PROJECT/libs/x86_64/} on your host machine, where {@code $PROJECT} is the root directory of your project. It also embeds them in your APK, under {@code /lib/x86_64/}.

The Android package manager extracts these libraries when installing your APK on a compatible 64-bit, x86-powered device, placing them under your app's private data directory.

In the Google Play store, the server filters applications so that a consumer sees only the native libraries that run on the CPU powering his or her device.

Standalone Toolchain

You can use the 64-bit x86 toolchain in standalone mode with the NDK. For more information about doing so, see Standalone Toolchain, under the "Advanced method" section.

Compatibility

The NDK provides native versions of Android APIs for 64-bit x86 machine code starting from Android 5.0 (Android API level 21). If your project files target an older API level, but include {@code x86_64} as a targeted platform, the NDK build script automatically selects the right set of native platform headers and libraries for you.