Deprecation of android-kotlin-extensions - specifically Parcelize.
See original GitHub issueandroid-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:
- Created 3 years ago
- Reactions:2
- Comments:7 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
same ^ with 4.3.1
solved with this version epoxy : 4.1.0 kotlinVersion : 1.4.10