Koko

May 26, 2025

Step 1: Get Your AI Running

There are a number of options for leveraging AI to build your KMP apps. For Koko, we are going to focus on Junie. Let's get started!

Step 1: Get Your AI Running

Junie is JetBrains' coding agent, meaning that Junie can not only tell answer your questions but also do things on your behalf (e.g., scan files, update multiple files, perform command line tasks). More details provided at https://www.jetbrains.com/junie/

Install Junie in Android Studio

As mentioned in the main post, we are going bleeding edge with the nightly build so that we can get all of the latest goodies: https://developer.android.com/studio/nightly

Once you have Android Studio preview installed, you need to install the Junie plugin (Android Studio -> Settings -> Plugins -> Search for Junie). You can activate a 30-day trial without a credit card.

## Add JetBrains' KMP Plugin

While adding plugins, let's add JetBrains KMP Plugin. This plugin has some nice features - we will be adding some details on what comes in this plugin soon - but for now we are just focused on creating a new KMP Project. So install the plugin (Android Studio -> Settings -> Plugins -> Search for Kotlin Multiplatform), restart Android Studio, and you should be able to create a new KMP Project at File -> New -> New Project -> Kotlin Multiplatform App.

## Add Koin to Project

To test out AI in your new KMP project, let's try adding Koin. Koin is a dependency injection framework. It serves a similar function to Dagger Hilt. and is quite popular in KMP (currently ranked #7 on klibs.io with 9.4k ⭐️).

Junie Prompt: Can you help me to add Koin to this application - adding the library and identifying areas to use it.

Junie will make a bunch of code change recommendations that you can review and approve.

I ended up with an error. This is pretty common when coding with AI (whether Junie or any other agents I have tried). Do small units of work, test often, and be ready to roll back. Here is the error that I got.

Configuration cache state could not be cached: field `__librarySourceSets__` of task `:composeApp:mapDebugSourceSetPaths` of type `com.android.build.gradle.tasks.MapSourceSetPathsTask`: error writing value of type 'org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection'
> Could not resolve all files for configuration ':composeApp:debugRuntimeClasspath'.
   > Could not find io.insert-koin:koin-compose:3.5.3.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/io/insert-koin/koin-compose/3.5.3/koin-compose-3.5.3.pom
     Required by:
         project :composeApp

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

It ended up suggesting something that was not correct (I confirmed that neither of these was required by visiting the Koin docs https://insert-koin.io/docs/4.1/setup/koin/) - so I rejected this recommendation.

Instead I opened up the Version Catalog (libs.version.toml) and saw the squiggly line under Koin 3.5.3 and accepted Android Studio's suggestion to Change to 4.0.4.

This made the project buildable. Next up, we will actually put some dependency injection to work....[to be continued:)]

Matt Dyor2
by Matt Dyor2
More Posts
Build Native Apps Fast with Koko

Build Native Apps Fast with Koko

If you are a startup looking to build a native Android and iOS application, you should consider using Kotlin Multiplatform or KMP. And if you want to use KMP, you should consider using Koko - the libraries, tools, and guidance that startups need to move fast.

Published May 25, 2025

Getting Started building Android and iOS apps with Kotlin Multiplatform

Getting Started building Android and iOS apps with Kotlin Multiplatform

Let's install the key tools needed to begin Android Studio development with Kotlin Multiplatform. This guide is designed to help developers leverage Koko's startup framework to streamline their development process.

Published Jun 29, 2025

Architectural Deep Dive: The KotlinConf Application

Architectural Deep Dive: The KotlinConf Application

The KotlinConf application is a useful showcase of Kotlin Multiplatform (KMP), demonstrating how KMP can deliver a comprehensive, cross-platform application from a largely shared codebase. This post covers the KotlinConf Application's architecture, capabilities, and the foundational libraries that enable core KMP functionality. The application uses KMP to share business logic and user interface components (via Compose Multiplatform) across Android, iOS, desktop, and web. Its backend is built with Ktor and Exposed, forming a Kotlin stack. Key capabilities include schedule management, real-time updates, and feedback mechanisms, all delivered with a consistent user experience across diverse platforms. This implementation highlights KMP's role in developer efficiency and cross-platform consistency.

Published Jul 5, 2025

Page generated at: 2025-07-12T07:50:48.700Z