# Ndk

[View Source](https://cs.android.com/search?q=file:com/android/build/api/dsl/Ndk.kt+class:com.android.build.api.dsl.Ndk) Added in 4.2.0


```
interface Ndk
```

<br />

*** ** * ** ***

DSL object for per-variant NDK settings, such as the ABI filter.

## Summary

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html>` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/Ndk#abiFilters()` Specifies the Application Binary Interfaces (ABI) that Gradle should build outputs for and package with your APK. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/Ndk#cFlags()` **This property is deprecated.** Specify C/C++ flags in CMakeLists.txt or Application.mk |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/Ndk#debugSymbolLevel()` The type of debug metadata which will be packaged in the app bundle. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html?` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/Ndk#jobs()` **This property is deprecated.** Use Cmake or NdkBuild DSL instead |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html>?` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/Ndk#ldLibs()` **This property is deprecated.** Specify LD libs in CMakeLists.txt or Application.mk |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/Ndk#moduleName()` **This property is deprecated.** Specify module name in CMakeLists.txt or Application.mk |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/Ndk#stl()` **This property is deprecated.** Specify stl name in CMakeLists.txt or Application.mk |

## Public properties

### abiFilters

Added in 4.2.0

```
val abiFilters: MutableSet<String>
```

Specifies the Application Binary Interfaces (ABI) that Gradle should build outputs for and package with your APK.

You can list any subset of the [ABIs the NDK supports](https://developer.android.com/ndk/guides/abis.html#sa), as shown below:

```
android {
    // Similar to other properties in the defaultConfig block, you can override
    // these properties for each product flavor in your build configuration.
    defaultConfig {
        ndk {
            // Tells Gradle to build outputs for the following ABIs and package
            // them into your APK.
            abiFilters 'x86', 'x86_64', 'armeabi'
        }
    }
}
```

When this flag is not configured, Gradle builds and packages all available ABIs.

To reduce the size of your APK, consider [configuring multiple APKs based on ABI](https://developer.android.com/studio/build/configure-apk-splits.html#configure-abi-split)---instead of creating one large APK with all versions of your native libraries, Gradle creates a separate APK for each ABI you want to support and only packages the files each ABI needs.

### cFlags

Added in 4.2.0 Deprecated in 8.5.0

```
var cFlags: String?
```

> [!CAUTION]
> **This property is deprecated.**   
> Specify C/C++ flags in CMakeLists.txt or Application.mk

The C Flags

### debugSymbolLevel

Added in 4.2.0

```
var debugSymbolLevel: String?
```

The type of debug metadata which will be packaged in the app bundle.

Supported values are 'none' (default, no native debug metadata will be packaged), 'symbol_table' (only the symbol tables will be
packaged), and 'full' (the debug info and symbol tables will be packaged).

Example usage:

```
android {
     buildTypes {
         release {
             ndk {
                 debugSymbolLevel 'symbol_table'
             }
         }
     }
}
```

### jobs

Added in 4.2.0 Deprecated in 8.5.0

```
var jobs: Int?
```

> [!CAUTION]
> **This property is deprecated.**   
> Use Cmake or NdkBuild DSL instead

Number of parallel threads to spawn.

### ldLibs

Added in 4.2.0 Deprecated in 8.5.0

```
val ldLibs: MutableList<String>?
```

> [!CAUTION]
> **This property is deprecated.**   
> Specify LD libs in CMakeLists.txt or Application.mk

The LD Libs

### moduleName

Added in 4.2.0 Deprecated in 8.5.0

```
var moduleName: String?
```

> [!CAUTION]
> **This property is deprecated.**   
> Specify module name in CMakeLists.txt or Application.mk

The module name

### stl

Added in 4.2.0 Deprecated in 8.5.0

```
var stl: String?
```

> [!CAUTION]
> **This property is deprecated.**   
> Specify stl name in CMakeLists.txt or Application.mk

The APP_STL value