SDK setup for Android apps
This guide sets up the Kotzilla SDK in your Android app.
This guide assumes your app uses Koin. For Hilt, Metro, Dagger, or manual DI, see Setup with Hilt, Metro, or manual DI.
Before starting, your application must be registered on the Kotzilla Platform:
- With the Koin IDE Plugin in Android Studio or IntelliJ IDEA, or
- In the Kotzilla Console, from your browser.
Once your app is registered and its type is selected, follow the steps below to add the SDK.
Step 1 - Setup Kotzilla SDK (Android)
1.1 Kotzilla project configuration file
Download the kotzilla.json configuration file for your app module and place it in the following directory:
Module (app module) Gradle file: <project>/<app-module>

This file contains your API key, version, and SDK configuration for shared code.
1.2 Set up the SDK
The instructions below use Version Catalog configuration by default.
If your project uses the legacy Gradle setup, see the legacy Gradle setup instructions.
The Kotzilla SDK is available on Maven Central and on the Kotzilla public repository. To use the Kotzilla repository, see Kotzilla repository access.
Add the following lines to your libs.versions.toml file:
[versions]
kotzilla = "3.0.1" // Check the latest version available below
[libraries]
kotzilla-sdk = { group = "io.kotzilla", name = "kotzilla-sdk", version.ref = "kotzilla" }
[plugins]
kotzilla = { id = "io.kotzilla.kotzilla-plugin", version.ref = "kotzilla" }
Set up the Kotzilla Plugin in your project root-level Gradle file (<project>/build.gradle.kts):
plugins {
alias(libs.plugins.kotzilla) apply true
}
In your app module Gradle file (<project>/<app-module>/build.gradle.kts), add:
plugins {
alias(libs.plugins.kotzilla)
}
The SDK dependency is automatically added by the plugin. You don't need to add an implementation line.
To manage it yourself, set kotzilla { autoAddDependencies = false }, then add implementation(libs.kotzilla.sdk)
The kotzilla {} block supports more options (autoAddDependencies, uploadMappingFile, versionName, and others). See Kotzilla Gradle plugin configuration for the full reference.
1.3 Sync Gradle
Sync your project in Android Studio or IntelliJ IDEA to apply the changes.
Builds print the Kotzilla report for the selected app version. By default, a FAIL status does not block the build: the report is for information. To make a FAIL status fail the build, set kotzilla { skipBuildReportFailure = false }, or override it per build from CI/CD with -Pkotzilla.skipBuildReportFailure=false. See Kotzilla Gradle plugin configuration for details.
Step 2 - Start Kotzilla SDK (Android)
Initialize the Kotzilla SDK in your app's Application class:
import io.kotzilla.generated.monitoring
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
startKoin {
androidContext(this@MyApplication)
monitoring() // Recommended for all platforms
}
}
}
Call monitoring() last inside the startKoin { ... } block, after any modules(...) and includes(...) declarations, to avoid initialization issues.
analytics() (import io.kotzilla.sdk.analytics.koin.analytics) is still available on Android and is not deprecated, but we recommend monitoring(), which works the same way on every platform.
KotzillaSDK.setup(...)?monitoring() and analytics() load your kotzilla.json configuration automatically. If you start the SDK through the older manual KotzillaSDK.setup(context) API instead, the generated configuration is not loaded for you. The SDK can then fall back to a legacy kotzilla.key asset and connect with the wrong API key (for example, a debug key on a production build).
If you must keep the manual setup, load the configuration first:
import io.kotzilla.generated.initKotzillaConfig
initKotzillaConfig() // loads the keys from kotzilla.json
KotzillaSDK.setup(androidContext) // legacy manual start
Also delete any leftover src/main/assets/kotzilla.key. We recommend monitoring() for new and existing integrations.
Step 3 - Go To Dashboard
Now that the SDK is configured, you can build and run your app to start capturing data from a first user session.
Once you've stopped the app:
- Click Check your data to confirm everything is being collected correctly.
- Then click Go to Dashboard to see your app's performance and configuration.
Questions or issues during setup? Contact us.
The Kotzilla MCP Server can also guide your setup and analyze issues from your AI coding assistant.
