Skip to content

The library pulls deprecated kotlin-android-extensions-runtime (duplicate classes with kotlin-parcelize-runtime) #120

@bigman212

Description

@bigman212

Summary

When using com.hannesdorfmann:adapterdelegates4-kotlin-dsl-viewbinding:4.3.2 in a project on Kotlin 2.2.21 with the kotlin-parcelize plugin, the dependency tree drags in org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.5.31, which is deprecated.

This collides with org.jetbrains.kotlin:kotlin-parcelize-runtime:2.2.21, producing duplicate class errors for kotlinx.android.parcel.*.

Environment

Kotlin: 2.2.21
Kotlin Parcelize plugin: 2.2.21
AGP: 8.13.2
Gradle: 8.14.3
Library: com.hannesdorfmann:adapterdelegates4-kotlin-dsl-viewbinding:4.3.2
AndroidX / other deps: standard, no explicit android-extensions usage.

Error (build output)

Duplicate class kotlinx.android.parcel.IgnoredOnParcel found in modules  kotlin-android-extensions-runtime-1.5.31.jar (org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.5.31)  kotlin-parcelize-runtime-2.2.21.jar (org.jetbrains.kotlin:kotlin-parcelize-runtime:2.2.21)... (Parceler, Parcelize, RawValue, TypeParceler, WriteWith)

Steps to Reproduce

  1. Create an Android project with Kotlin 2.2.21 and apply kotlin-parcelize.
  2. Add implementation("com.hannesdorfmann:adapterdelegates4-kotlin-dsl-viewbinding:4.3.2").
  3. Build the app.
  4. Build fails with duplicate classes from kotlin-android-extensions-runtime vs kotlin-parcelize-runtime.

Expected

The library should not bring kotlin-android-extensions-runtime (deprecated since Kotlin 1.4) and should remain compatible with current Kotlin/Parcelize without duplicate classes.

Actual

kotlin-android-extensions-runtime:1.5.31 is pulled transitively, causing duplicate class errors with kotlin-parcelize-runtime:2.2.21.

Please remove the kotlin-android-extensions-runtime dependency (or replace it with the modern parcelize runtime aligned to current Kotlin), and, if needed, bump Kotlin stdlib/parcelize to match current Kotlin releases so users don’t need manual excludes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions