Skip to main content

Codelab: fix Now in Android

The Kotzilla codelab is a version of Google's Now in Android where Hilt is replaced by Koin and the Kotzilla SDK is already wired in. It ships with performance and stability bugs we added on purpose.

You don't need to look for the bugs in the code. Kotzilla finds them from what the app does at runtime, and your AI agent fixes them with that evidence through the Kotzilla MCP Server. At the end, you compare the version you started from with your fixed version.

What you will fix​

IssueWhat happensGuide
CrashOpening the Interests tab crashes the appFix crashes
Slow cold startThe app takes more than 10 seconds to show its feedFix slow app startup
ANR and slow screenMainActivity freezes for about 5 secondsFix ANRs and slow screens
Main thread blockMainActivityViewModel takes about 5 seconds to be createdOther performance issues
Background thread blockThe sync worker takes about 2 seconds to be createdOther performance issues
Slow transitionsScreens take about 700 ms to become interactive. This one comes with Now in Android itselfOther performance issues

The steps​

  1. Set up and capture a session: connect your AI agent to the MCP Server, register the app with one prompt, and run it.
  2. Find and fix the issues: read the report, then fix the crash, the startup blockers and the slow transitions with your agent.
  3. Verify your fixes: capture an "after" session and compare it with the version you started from.

Prerequisites​

  • Kotlin at an intermediate level, and basic Android, ViewModel and dependency injection.
  • Android Studio with the Android SDK, and a working emulator or device.
  • A free Kotzilla account. The MCP Server and the platform both sign in with it.
  • An AI agent that supports MCP, such as Claude Code, Codex, Cursor, Junie or GitHub Copilot.

Clone the codelab and run one successful build before you start. Now in Android has about 30 modules, so the first build is slow:

git clone https://github.com/kotzilla-io/kotzilla-codelab-nia.git
cd kotzilla-codelab-nia
./gradlew :app:assembleDemoDebug
Your own app

To set up Kotzilla in your own app instead, start with the MCP Server quick start.