JetBrains stay Kotlin 1.1.4
release The Parcelize( replace Parcelable Implement serialization ), That is to say, if you want to use , Must upgrade to 1.1.4 Later versions .

     So far , It and Kotlin Coroutine It's also an experimental feature , If used, it needs to be in the app Modular build.gradle Add the following code to the file :
androidExtensions { experimental = true }

Add the following comments to the data class :
@Parcelize data class AddressBean( var id: Int, var uid: Int, var name: String,
var address: String, var def: Int , var phone: String ) : Parcelable

Here are the problems encountered ( the reason being that java Project direct convert reach kotlin The problem with the code )
     After operation in the normal way , find Parcelize This class cannot be found , That is, there is no way to quote it , Try every means :

* clean,rebuild Dafa ( invalid )
* tools - kotlin - Configure Kotlin in Project ( invalid )
* modify Project lower build.gradle Inside kotlin edition ( invalid )
* View official documents ( invalid , Because there are only a few words about how to use them , And then I did exactly the same thing )

Calm down and think after trying everything , can't find Parcelize It may have something to do with dependent libraries , So a new one was created kotlin project , Make sure that new projects Parcelize It works , Compare the dependency libraries of the two projects , Found missing :
org.jetbrains.kotlin:kotlin-android-extensions-runtime
So in the moudle Under the build.gradle Manual join in
implementation
"org.jetbrains.kotlin:kotlin-android-extensions-runtime:$kotlin_version"
try again…

ok, I get “Parcelize”!!!!!

The above is purely personal , If you have any questions, please correct them
As for why java Project direct convert reach kotlin It won't be found Parcelize I'm not sure , Hope for the guidance of the great God !

Technology