当前位置:   article > 正文

kotlin使用@Parcelize报错_public abstract fun describecontents(): int define

public abstract fun describecontents(): int defined in android.os.parcelable

kotlin data class使用@Parcelize报错

Class ‘DataInfo’ is not abstract and does not implement abstract member public abstract fun describeContents(): Int defined in android.os.Parcelable

AGP版本 1.8.0

解决办法

在app/build.gradle plugins 里添加 id ‘kotlin-parcelize’

plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
    id 'kotlin-parcelize'
}
  • 1
  • 2
  • 3
  • 4
  • 5
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/259853
推荐阅读
相关标签
  

闽ICP备14008679号