- Qbs Manual
- Module Android.ndk
- Qt Build Suite 1.4.0

# Module Android.ndk

The `Android.ndk` module contains the properties and rules to create native libraries for use in Android application packages.

Normally, you will not use this module directly, but instead work with the DynamicLibrary and StaticLibrary items that Qbs provides. Here is what the project file for the "hello-jni" example that comes with the NDK could look like:

    import qbs

    Project {
        DynamicLibrary {
            name: "hello-jni"
            architectures: ["mips", "x86"]
            files: ["jni/hello-jni.c"]
        }

        AndroidApk {
            name: "HelloJni"
            packageName: "com.example.hellojni"
            Depends { productTypes: ["android.nativelibrary"] }
        }
    }

## Android.ndk Properties

These properties are set automatically when creating an Android profile via the `setup-android` tool.

Property | Type | Default | Description
--- | --- | --- | ---
abi | string | undefined | The ABI name as it appears under "lib/" in the application package.
appStl | string | `"system"` | The library to use for C++. The possible values are: "system", "gabi++_static", "gabi++_shared", "stlport_static", "stlport_shared", "gnustl_static", "gnustl_shared", "c++_static", "c++_shared".
buildProfile | string | undefined | The name of the build profile, e.g. "armeabi-v7a-hard".
enableExceptions | bool | `appStl !== "system"` | Whether to enable exceptions in C++ code.
enableRtti | bool | `appStl !== "system"` | Whether to enable runtime type information in C++ code.
ndkDir | path | undefined | The NDK base directory.
platform | string | `"android-9"` | The versioned platform name.