@Parcelize not resolved with androidExtensions experimental mode set to true

Ah! I located a working solution. Set the experimental flag in a Groovy-based androidExtensions.gradle then apply that file in your Kotlin-based build.gradle.kts.

I wanted to pass it along but credit goes to toxxmeister.


Add this Plugin in your build.gradle(app) file.

id 'kotlin-android-extensions'


In my case. Just swap 2 line of code kotlin-android and kotlin-android-extensions then it work.

So the sequence below is work:

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

All you need to do is add below plugin to your app level gradle file

apply plugin: 'kotlin-parcelize'

PS: apply plugin: 'kotlin-android-extensions' is deprecated.