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
| Issue | What happens | Guide |
|---|---|---|
| Crash | Opening the Interests tab crashes the app | Fix crashes |
| Slow cold start | The app takes more than 10 seconds to show its feed | Fix slow app startup |
| ANR and slow screen | MainActivity freezes for about 5 seconds | Fix ANRs and slow screens |
| Main thread block | MainActivityViewModel takes about 5 seconds to be created | Other performance issues |
| Background thread block | The sync worker takes about 2 seconds to be created | Other performance issues |
| Slow transitions | Screens take about 700 ms to become interactive. This one comes with Now in Android itself | Other performance issues |
The steps
- Set up and capture a session: connect your AI agent to the MCP Server, register the app with one prompt, and run it.
- Find and fix the issues: read the report, then fix the crash, the startup blockers and the slow transitions with your agent.
- 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.