# Ndk

# Ndk

<br />

```
public interface Ndk
```

<br />

*** ** * ** ***

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

## Summary

|                                                                                                                                                                                                     ### Public methods                                                                                                                                                                                                      |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `abstract @`[NonNull](https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull)` `[Set](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html)`<@`[NonNull](https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull)` `[String](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html)`>` | [getAbiFilters](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Ndk#getAbiFilters())`()` Specifies the Application Binary Interfaces (ABI) that Gradle should build outputs for and package with your APK.                                                                                            |
| `abstract `[String](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html)                                                                                                                                                                                                                                                                                                                     | [getCFlags](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Ndk#getCFlags())`()` The C Flags                                                                                                                                                                                                          |
| `abstract `[String](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html)                                                                                                                                                                                                                                                                                                                     | [getDebugSymbolLevel](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Ndk#getDebugSymbolLevel())`()` The type of debug metadata which will be packaged in the app bundle.                                                                                                                             |
| `abstract `[Integer](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Integer.html)                                                                                                                                                                                                                                                                                                                   | [getJobs](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Ndk#getJobs())`()` Number of parallel threads to spawn.                                                                                                                                                                                     |
| `abstract `[List](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html)`<@`[NonNull](https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull)` `[String](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html)`>`                                                                                                           | [getLdLibs](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Ndk#getLdLibs())`()` The LD Libs                                                                                                                                                                                                          |
| `abstract `[String](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html)                                                                                                                                                                                                                                                                                                                     | [getModuleName](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Ndk#getModuleName())`()` The module name                                                                                                                                                                                              |
| `abstract `[String](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html)                                                                                                                                                                                                                                                                                                                     | [getStl](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Ndk#getStl())`()` The APP_STL value                                                                                                                                                                                                          |
| `abstract void`                                                                                                                                                                                                                                                                                                                                                                                                             | [setCFlags](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Ndk#setCFlags(kotlin.String))`(`[String](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html)` cFlags)` The C Flags                                                                                        |
| `abstract void`                                                                                                                                                                                                                                                                                                                                                                                                             | [setDebugSymbolLevel](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Ndk#setDebugSymbolLevel(kotlin.String))`(`[String](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html)` debugSymbolLevel)` The type of debug metadata which will be packaged in the app bundle. |
| `abstract void`                                                                                                                                                                                                                                                                                                                                                                                                             | [setJobs](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Ndk#setJobs(kotlin.Int))`(`[Integer](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Integer.html)` jobs)` Number of parallel threads to spawn.                                                                      |
| `abstract void`                                                                                                                                                                                                                                                                                                                                                                                                             | [setModuleName](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Ndk#setModuleName(kotlin.String))`(`[String](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html)` moduleName)` The module name                                                                        |
| `abstract void`                                                                                                                                                                                                                                                                                                                                                                                                             | [setStl](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Ndk#setStl(kotlin.String))`(`[String](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html)` stl)` The APP_STL value                                                                                           |

## Public methods

### getAbiFilters

```
abstract @NonNull Set<@NonNull String> getAbiFilters()
```

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:  

```carbon
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.  

### getCFlags

```
abstract String getCFlags()
```

The C Flags  

### getDebugSymbolLevel

```
abstract String getDebugSymbolLevel()
```

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'
            }
        }
    }
}
```  

### getJobs

```
abstract Integer getJobs()
```

Number of parallel threads to spawn.  

### getLdLibs

```
abstract List<@NonNull String> getLdLibs()
```

The LD Libs  

### getModuleName

```
abstract String getModuleName()
```

The module name  

### getStl

```
abstract String getStl()
```

The APP_STL value  

### setCFlags

```
abstract void setCFlags(String cFlags)
```

The C Flags  

### setDebugSymbolLevel

```
abstract void setDebugSymbolLevel(String debugSymbolLevel)
```

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'
            }
        }
    }
}
```  

### setJobs

```
abstract void setJobs(Integer jobs)
```

Number of parallel threads to spawn.  

### setModuleName

```
abstract void setModuleName(String moduleName)
```

The module name  

### setStl

```
abstract void setStl(String stl)
```

The APP_STL value