---
title: "Initializing Nutrient"
canonical_url: "https://www.nutrient.io/guides/android/basics/initializing-pspdfkit/"
md_url: "https://www.nutrient.io/guides/android/basics/initializing-pspdfkit.md"
last_updated: "2026-06-09T10:38:40.793Z"
description: "Solutions for common issues and errors in Nutrient Android SDK with debugging tips and workarounds."
---

Apps using Nutrient need to initialize the framework before its first use. This can be done either automatically at application startup, or manually. Before initializing Nutrient, be sure to [acquire a valid license key](https://www.nutrient.io/sdk/android/getting-started.md).

## Automatic initialization

The easiest way to initialize Nutrient is automatically during application startup. To configure automatic initialization, add `<meta-data>` elements to your app’s `AndroidManifest.xml`. Without any of the supported elements, Nutrient will initialize the SDK in trial mode.

### License

```xml

<application>
	<meta-data
		android:name="nutrient_license_key"
		android:value="YOUR_LICENSE_KEY_GOES_HERE" />
</application>

```

Without the license key in the metadata, Nutrient will initialize the SDK in trial mode.

### Custom fonts

By default, the PDF renderer uses the installed system fonts (located in the `system/fonts` folder of your mobile device), but you can provide additional font paths by adding the following:

```xml

<application>
	<meta-data
		android:name="nutrient_font_path"
		android:value="assets/fonts/serifs;assets/fonts/sans" />
</application>

```

TrueType (`.ttf`) and OpenType fonts (`.otf`) are supported. Paths starting with a root folder named asset will be treated as an application asset and accessed via Android’s `AssetManager`. Otherwise, they’re expected to address a path relative to your application’s local storage. There’s no deep query for font files; only the ones that are directly in a given path will be considered. In case you need to specify multiple paths, you can do so by separating them with a `;` as seen in the example above.

## Manual initialization

In some situations, you might want to initialize Nutrient manually at a later point (meaning not during app startup). This can be done by deactivating the automatic initialization in your `AndroidManifest.xml`:

```xml

<application>
	<meta-data
			android:name="nutrient_automatic_initialize"
            android:value="false" />
</application>

```

When doing so, Nutrient won’t initialize itself at startup. Instead, use the [`Nutrient.initialize()`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit/-nutrient/initialize.html) method, which takes an [`InitializationOptions`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.initialization/-initialization-options/index.html) object:

```kotlin

Nutrient.initialize(
    context,
    InitializationOptions(
        licenseKey = "YOUR_LICENSE_KEY_GOES_HERE",
        //... Add other possible options here.
    )
)

```

Since initialization can take some time (due to extraction and loading of Nutrient’s native libraries), make sure to initialize Nutrient on a background thread, in order to not block your UI.