Qbs Manual

Qbs 1.12.1

# Android.ndk

Provides support for building native Android libraries. More...

Since: | Qbs 1.4

- List of all members, including inherited members

## Properties

- abi : string
- appStl : string
- ndkDir : path
- platform : string

## Detailed Description

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"
              qbs.architectures: ["mips", "x86"]
              files: ["jni/hello-jni.c"]
          }

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

### Relevant File Tags

Tag | Since | Description
--- | --- | ---
`"android.nativelibrary"` | 1.4.0 | Attached to dynamic libraries that will end up in APK packages. You do not normally need to use the tag explicitly, as it is the default type of the DynamicLibrary item for Android targets.

## Property Documentation

abi : string

The ABI name as it appears under `"lib/"` in the application package. Corresponds to `APP_ABI` in `Android.mk`.

Default: Undefined

appStl : string

The library to use for C++. The possible values are:

- `"c++_shared"`
- `"c++_static"`
- `"gabi++_shared"`
- `"gabi++_static"`
- `"gnustl_shared"`
- `"gnustl_static"`
- `"stlport_shared"`
- `"stlport_static"`
- `"system"`

Default: `"system"`

ndkDir : path

The NDK base directory.

Default: Undefined

platform : string

The versioned platform name.

Default: `"android-9"`