Qbs Manual | AndroidApk Item

Qbs 1.9.0

AppleDiskImage Item

# AndroidApk Item

An `AndroidApk` item is a `Product` of type android.apk. It has a dependency on the Android.sdk module. The final build result is an Android application package (APK) file. Here is what the project file could look like for the BasicMediaDecoder example that comes with the Android SDK:

      import qbs

      AndroidApk {
          name: "Basic Media Decoder"
          packageName: "com.example.android.basicmediadecoder"

          property string sourcesPrefix: "Application/src/main/"

          resourcesDir: sourcesPrefix + "/res"
          sourcesDir: sourcesPrefix + "/java"
          manifestFile: sourcesPrefix + "/AndroidManifest.xml"
      }

## AndroidApk Properties

The following properties are available in addition to the ones inherited from `Product`.

Property | Type | Default | Description
--- | --- | --- | ---
assetsDir | path | `"assets"` | The base directory for Android assets. Note: Android requires that the file name of this directory is always "assets".
automaticSources | bool | `true` | If this is enabled, Java sources as well as Android resources, assets and the manifest file will be automatically included in the product via wildcards. Set this property to `false` if you want to specify these files manually.
manifestFile | path | `"AndroidManifest.xml"` | The file path to the Android manifest file. Note: Android requires that the file name is always "AndroidManifest.xml".
packageName | string | `name` | The package name as given in the manifest file.
resourcesDir | path | `"res"` | The base directory for Android resources. Note: Android requires that the file name of this directory is always "res".
sourcesDir | path | `"src"` | The base directory for Java sources. This property is only relevant if `automaticSources` is enabled.

AppleDiskImage Item