I will go to the demonstration soon. When I go to the order list page, I always crash. The error log is as follows:
java.lang.RuntimeException: Unable to start activity ComponentInfo{cn.com.henansoft.tripbus/cn.com.henansoft.tripbus.ui.rent.RentCarActivity}: java.lang.IllegalStateException: source.readString() must not be null at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2470) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2532) at android.app.ActivityThread.access$900(ActivityThread.java:169) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1421) at android.os.Handler.dispatchMessage(Handler.java:111) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5562) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:968) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:763) Caused by: java.lang.IllegalStateException: source.readString() must not be null at cn.com.henansoft.tripbus.bean.Order.<init>(Order.kt:30) at cn.com.henansoft.tripbus.bean.Order$Companion$CREATOR$1.createFromParcel(Order.kt:58) at cn.com.henansoft.tripbus.bean.Order$Companion$CREATOR$1.createFromParcel(Order.kt:57) at android.os.Parcel.readParcelable(Parcel.java:2246) at android.os.Parcel.readValue(Parcel.java:2146) at android.os.Parcel.readArrayMapInternal(Parcel.java:2479) at android.os.BaseBundle.unparcel(BaseBundle.java:224) at android.os.BaseBundle.getBoolean(BaseBundle.java:662) at android.os.Bundle.getBoolean(Bundle.java:603) at android.content.Intent.getBooleanExtra(Intent.java:4900) at cn.com.henansoft.tripbus.ui.rent.RentCarActivity.initView(RentCarActivity.kt:65) at cn.com.henansoft.tripbus.base.BaseActivity.onCreate(BaseActivity.java:107) at android.app.Activity.performCreate(Activity.java:6029) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1111) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2423) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2532) at android.app.ActivityThread.access$900(ActivityThread.java:169) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1421) at android.os.Handler.dispatchMessage(Handler.java:111) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5562) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:968) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:763)
The project was written in kotlin, not so much thought, and then searched StackOverflow to find a similar question: https://stackoverflow.com/questions/45688232/illegalstateexception-parcel-readstring-must-not-be-null At present, the only solution is to make the members of the class that implements parcelable empty. But even if this is done, it's still wrong.
Finally, according to the data returned by the interface, it is found that the data returned by the interface lacks some corresponding fields, so the members of the class of parcelable are empty.