Android.ndk
Provides support for building native Android libraries. More...
Since: | Qbs 1.4 |
Properties
Detailed Description
The Android.ndk
module contains the properties and rules to create native libraries for use in Android applications.
Normally, you will not use this module directly, but instead work with the DynamicLibrary, StaticLibrary and Application items that Qbs provides.
Here is what the project file for the hello-jni
example that comes with the NDK could look like:
CppApplication { name: "HelloJni" Android.sdk.packageName: "com.example.hellojni" qbs.architectures: ["arm", "x86"] files: "app/src/main/jni/hello-jni.c" }
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"
Default: "c++_shared"
[since Qbs 1.21] buildId : string |
Value to pass to the –build-id linker flag. Plain –build-id option is used when buildId property is empty.
Default: "sha1"
This property was introduced in Qbs 1.21.
ndkDir : path |
The NDK base directory.
Default: Undefined
platform : string |
The versioned platform name.
Default: "android-16"
for 32 bit arm ABIs and "android-21"
for all 64 bit ABIs and x86. x86 ABI has broken wstring support in android-16 to android-19.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.