question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deprecation of android-kotlin-extensions - specifically Parcelize.

See original GitHub issue

android-kotlin-extensions is being deprecated in the latest releases of kotlin (1.4.20). https://proandroiddev.com/migrating-the-deprecated-kotlin-android-extensions-compiler-plugin-to-viewbinding-d234c691dec7

When attempting to update my app - I ran into an issue building:

   > Duplicate class kotlinx.android.parcel.IgnoredOnParcel found in modules jetified-kotlin-android-extensions-runtime-1.4.10 (org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.4.10) and jetified-kotlin-parcelize-runtime-1.4.20-RC (org.jetbrains.kotlin:kotlin-parcelize-runtime:1.4.20-RC)
     Duplicate class kotlinx.android.parcel.Parceler found in modules jetified-kotlin-android-extensions-runtime-1.4.10 (org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.4.10) and jetified-kotlin-parcelize-runtime-1.4.20-RC (org.jetbrains.kotlin:kotlin-parcelize-runtime:1.4.20-RC)
     Duplicate class kotlinx.android.parcel.Parceler$DefaultImpls found in modules jetified-kotlin-android-extensions-runtime-1.4.10 (org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.4.10) and jetified-kotlin-parcelize-runtime-1.4.20-RC (org.jetbrains.kotlin:kotlin-parcelize-runtime:1.4.20-RC)
     Duplicate class kotlinx.android.parcel.Parcelize found in modules jetified-kotlin-android-extensions-runtime-1.4.10 (org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.4.10) and jetified-kotlin-parcelize-runtime-1.4.20-RC (org.jetbrains.kotlin:kotlin-parcelize-runtime:1.4.20-RC)
     Duplicate class kotlinx.android.parcel.RawValue found in modules jetified-kotlin-android-extensions-runtime-1.4.10 (org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.4.10) and jetified-kotlin-parcelize-runtime-1.4.20-RC (org.jetbrains.kotlin:kotlin-parcelize-runtime:1.4.20-RC)
     Duplicate class kotlinx.android.parcel.TypeParceler found in modules jetified-kotlin-android-extensions-runtime-1.4.10 (org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.4.10) and jetified-kotlin-parcelize-runtime-1.4.20-RC (org.jetbrains.kotlin:kotlin-parcelize-runtime:1.4.20-RC)
     Duplicate class kotlinx.android.parcel.WriteWith found in modules jetified-kotlin-android-extensions-runtime-1.4.10 (org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.4.10) and jetified-kotlin-parcelize-runtime-1.4.20-RC (org.jetbrains.kotlin:kotlin-parcelize-runtime:1.4.20-RC)

On doing some digging, the only other usage I can find for Parcelize is within epoxy where the kotlin version is locked to 1.4.10, and android-kotlin-extensions is still in use. specifically here: https://github.com/airbnb/epoxy/blob/3905f50321b98ad296b4d058b765ebf1fb5f4dea/epoxy-adapter/src/main/java/com/airbnb/epoxy/stickyheader/StickyHeaderLinearLayoutManager.kt#L13

Are there any plans to update kotlin version and remove the dependency on android-kotlin-extensions?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

16reactions
ibcurlycommented, Dec 4, 2020

same ^ with 4.3.1

9reactions
choirurucommented, Dec 4, 2020

solved with this version epoxy : 4.1.0 kotlinVersion : 1.4.10

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use @Parcelize now that kotlin-android-extensions is ...
kotlin-android-extensions is deprecated so replace it from kotlin-parcelize; If there is @Parcelize annotation used for model classes so you ...
Read more >
Migrating the deprecated Kotlin Android Extensions compiler ...
First you will need to add kotlin-parcelize plugin to your module. Then change your old import statement from import kotlinx.android.parcel.
Read more >
Deprecate Kotlin Android Extensions compiler plugin : KT-42121
As the @Parcelize functionality is extracted (KT-42120), the rest of the Android Extensions functionality can be deprecated in favour of View Binding.
Read more >
Android Kotlin extensions RIP - Medium
Parcelize allows you to remove boilerplate and easily create Parcelables through the @Parcelize annotation. Major drawbacks of Kotlin synthetics. They pollute ...
Read more >
How to use @Parcelize now that kotlin-android-extensions is ...
kotlin-android-extensions is deprecated so replace it from kotlin-parcelize ... First you will need to add kotlin-parcelize plugin to your module.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found