Skip to main content
This guide walks you through creating a minimal Klyx extension from scratch. You’ll set up a project, implement the plugin interface, and bundle it into a .klyx file.

Prerequisites

Create the project

Create a new Android project in Android Studio with No Activity. Use minimum SDK 28 and Kotlin. Your project structure should look like this:

Configure the version catalog

In gradle/libs.versions.toml:
libs.versions.toml

3. Set up the root build file

In build.gradle.kts:
build.gradle.kts

Configure the app module

In app/build.gradle.kts:
build.gradle.kts
The klyx-api dependency uses compileOnly because Klyx provides the API at runtime. Don’t use implementation.

Write the Android manifest

In app/src/main/AndroidManifest.xml:
AndroidManifest.xml

Create plugin.json

In plugin.json (at the project root):
plugin.json

Implement the plugin

In app/src/main/java/com/myextension/MyPlugin.kt:
MyPlugin.kt

Build the bundle

Run the Gradle task:
This produces output/my-extension.klyx — a bundle containing your APK, plugin.json, and any assets.

Install on Klyx

Transfer the .klyx file to your device and open it with Klyx. Klyx detects the bundle, reads plugin.json, loads the APK, instantiates your entryClass, and calls onLoad() followed by onStart(). Navigate to your screen from within Klyx’s navigation.

Next steps

Plugin Manifest Reference

Full reference for plugin.json fields

Plugin Lifecycle

Understand load, start, stop, and unload
Last modified on July 11, 2026