4.2.2Aktualisiert Aug 21, 2026

io.insert-koin:koin-android

4.2.22026-06-15T07:34:38Z
Release Notes

Features

  • Maintenance release for the 4.2.x line — resolver regression fixes from the 4.2.0 CoreResolverV2 rewrite, ViewModel/scope fixes, a Ktor request-scope fix, plus new tvOS support and an R8/ProGuard guide.
  • Anyone hitting resolver issues on 4.2.0/4.2.1 should upgrade to 4.2.2.

Bug Fixes

  • Stacked params no longer shadow qualified dependencies (#2370, #2408) — A value passed via parametersOf could be returned for a get(named(...)) request of the same type, shadowing the qualified definition. Qualified lookups are now registry-only and never read the parameter stack — parameters carry no qualifier, so they can't satisfy a qualified request.
  • Root factory no longer resolves its scoped dependencies from _root_ (#2379) — When a non-single factory defined in the root scope was resolved from a child scope, CoreResolverV2 resolved its scoped dependencies against _root_ instead of the requesting scope. Linked-scope resolution now runs the factory against the requesting scope (single instances keep their root-bound semantics, preserving #2325).
  • viewModelScopeFactory scope is linked to its parent (#2299) — A ViewModel scope created via viewModelScopeFactory() was not linked to the originating scope, so dependencies declared in the parent couldn't be resolved. The created scope is now linked to its parent (except when the parent is root).
  • Tolerate non-String environment properties (#2348) — Loading environment/system properties whose values aren't String threw ClassCastException due to an unchecked map cast. Non-String values are now preserved as Any and only String keys are required.
  • Unique Ktor request-scope ids under concurrency (#2410) — Concurrent requests could collide on request-scope ids. Ids are now generated from a monotonic counter seeded once at startup. Thanks @lfavreli-betclic!
  • Actionable errors for SavedStateHandle / viewModelScope { } (#2044, #2417) — Resolving SavedStateHandle without the proper extras, or using viewModelScope { } without the viewModelScopeFactory() option, now produces a clear, actionable error message instead of an opaque failure.

Added

  • tvOS targets for koin-core-viewmodel (#2426) — koin-core-viewmodel now publishes tvosArm64, tvosX64, and tvosSimulatorArm64, unblocking ViewModel usage on tvOS.
  • Consumer R8/ProGuard rules + guide — Android and ViewModel artifacts now ship consumer R8/ProGuard rules in their AARs, and a new R8 / ProGuard guide documents keep rules for minified builds.

Improvements

  • O(1) secondary-type registration in bind() / binds()bind/binds now append secondary types in O(1) instead of reallocating the type list per binding, removing quadratic cost when a definition declares many bindings. No user-visible behavior change.

Documentation

logo

Kotlin Github Actions Apache 2 License Slack channel

What is KOIN? ✨

Koin is a pragmatic, lightweight dependency injection framework for Kotlin developers, developed by Kotzilla and open-source contributors.

The pragmatic Kotlin & Kotlin Multiplatform Dependency Injection framework
- Simple, Powerful and now Compile-Safe -

Compile-Safe Dependency Injection 🛡️

Koin is now compile-safe thanks to the Koin Compiler Plugin. Your dependency graph is verified at compile time — missing bindings, broken definitions, and misconfigured modules are caught by the compiler instead of crashing at runtime.

  • Catch missing or invalid dependencies before you run your app
  • Keep Koin's concise, idiomatic DSL — no extra boilerplate
  • Works across Kotlin & Kotlin Multiplatform targets

Get started with the Koin Compiler Plugin.

Setup & Current Version 📦

Follow the dedicated setup page to setup Koin for your project. Here are the currently available Koin versions:

  • Latest Version : Maven Central

Developer Tools & Observability 🛠️

Kotzilla Platform — KMP Crash Reporting & Observability

Free signup on Kotzilla

The full observability platform for Kotlin Multiplatform apps:

  • Full KMP Crash Reporting — complete crash reports across Android, iOS and all KMP targets
  • Screen Rendering Impact — understand how each screen affects rendering and user experience
  • Performance Monitoring — track runtime performance, memory metrics, and Koin module behavior

A console-based suite with connected cloud services that visualizes your Koin module structure, provides advanced debugging and tracing, and seamlessly integrates with Kotlin Multiplatform projects.

Koin IDE Plugin — Your Koin Developer Assistant

Freely available on the JetBrains Marketplace

The perfect Koin developer assistant: native support for IntelliJ IDEA and Android Studio, with navigation, inspections, and productivity features dedicated to Koin across Kotlin and Kotlin Multiplatform projects.

Community & Enterprise Support 💬

Koin is backed by an active open-source community and by Kotzilla for teams that need guaranteed, enterprise-grade support.

Community Support 🌱

Free, open-source support from the Koin community:

Enterprise-Grade Support with Koin LTS 🏢

For teams with production and compliance requirements, Koin LTS delivers enterprise-grade support backed by Kotzilla:

  • SLA-backed updates and guaranteed response times
  • Long-term maintenance on stabilized Koin versions (e.g. Koin 3.5 LTS)
  • Security & compliance patches aligned with enterprise requirements
  • Direct access to Kotzilla experts — the team behind Koin
  • Priority bug fixes and advisory support for architecture and migration

👉 Learn more and opt in at kotzilla.io/koin-lts.

Latest News & Resources 🌐

Contributing 🛠

Want to help or share a proposal about Koin? Problem with a specific feature?

  • Open an issue to explain the issue you want to solve Open an issue
  • Come talk on slack #koin-dev channel
  • After discussion to validate your ideas, you can open a PR or even a draft PR if the contribution is a big one Current PRs

Additional readings about basic setup: https://github.com/InsertKoinIO/koin/blob/master/CONTRIBUTING.adoc

Contributors

Thank you all for your work! ❤️

Package README image

OpenCollective - Sponsorship ❤️

Support this project by becoming a sponsor and be displayed on the offcial website. [Help us and Become a sponsor!]

Versionen vergleichen

Wähle zwei Releases mit Changelog-Notizen um die Änderungen zu sehen.

Hier werden nur Releases mit verfügbaren Changelog-Notizen gezeigt.

Wähle zwei Versionen um Änderungen zu vergleichen.