SDK setup for Android apps
This guide will help you register your Android app on the Kotzilla Platform and set up the Kotzilla SDK to start debugging.
Step 1 - Register your application on Kotzilla
1.1 Register your application using the IDE Plugin
- Sign in to the Koin IDE Plugin
- Open the Application Issues tab in the Issues Panel
- Click the New App button
This will open the Register Your Application wizard in your browser
1.2 Define your application details
- Application Name: Enter your app’s name.
- Android Package Name: Enter the package name for your app (i.e,
com.example.myapp
). - App Type: Select "Debug" by default.
If you choose "Production," you’ll also need to provide the corresponding mapping file for your release build.*
Once registered, you’re ready to set up the Kotzilla SDK in your Android project.
You can also register new apps directly from the Kotzilla Console: Go to the Kotzilla Console and log in to your account. On the homepage, click Register Your Application.
Step 2 - Set up the Kotzilla SDK
2.1 Download the Kotzilla configuration file
Download the auto-generated Kotzilla.json
file. This file contains your project’s configuration details.
Place the Kotzilla.json
file in the app-level module directory of your Android Studio project (e.g., <project-root>/app
).
2.2 Update Gradle files
Kotzilla SDK is available on both Maven Central and the Kotzilla public repository. More information on how to configure access to the Kotzilla repository is available here
In your project root folder, add the plugin and Kotzilla SDK to the build.gradle.kts
:
Project (root-level) Gradle file (<project>/build.gradle.kts
):
buildscript {
repositories { ... }
dependencies {
// This part to copy paste
classpath("io.kotzilla:kotzilla-plugin:0.14.0-RC1")
}
}
In your app module add the plugin and Kotzilla SDK dependency to the build.gradle.kts
file within the module directory:
Module (app-level) Gradle file (<project>/<app-module>/build.gradle.kts
):
// --- Plugins ---
plugins {
// Add the Kotzilla Gradle plugin
id("io.kotzilla.kotzilla-plugin")
}
// --- Dependencies ---
dependencies {
// The Kotzilla SDK library dependency
implementation("io.kotzilla:kotzilla-sdk:0.14.0-RC1")
}
If your app is built with Ktor3, use this version instead:
implementation("io.kotzilla:kotzilla-sdk-ktor3:0.14.0-RC1")
2.3 Sync your project
After updating the Gradle files, sync your project in your favorite IDE to apply the changes.
Step 3 - Start the Kotzilla SDK in your app
In your Application
class:
- Start the Kotzilla SDK using
analytics()
during Koin initialisation
import io.kotzilla.sdk.analytics.koin.analytics
class MainApplication : Application() {
override fun onCreate() {
super.onCreate()
...
startKoin {
androidContext(this@MainApplication)
// Kotzilla SDK setup for Android apps
analytics()
...
}
}
}
Congratulations! The installation is now complete, and you’re all set to start debugging your app.