I'm rewriting my model class to Kotlin
, which has to be Parcelable
and used in AIDL
:
@Parcelize
data class MyCustomObject(val value1: String, val value2: String) : Parcelable
在编译过程中,它崩溃并出现错误:
错误:类型不兼容:对象无法转换为MyCustomObject
and points to this line in generated code:
if ((0!=_reply.readInt())) {
_result = com.mypackagename.MyCustomObject.CREATOR.createFromParcel(_reply);
}
我把这个注释用于其他目的,它还可以,只是在AIDL中我发现了不匹配.
Any ideas what's wrong?
编辑:5天后没有任何 comments ,我已经创建了a ticket for this issue条.