当前位置:网站首页>kotlin Android序列化
kotlin Android序列化
2022-08-02 14:07:00 【昵称审核中】
在app的build.gradle里面添加defaultConfig{androidExtensions { experimental = true }}
然后在数据类进行操作,如下代码
import android.os.Parcelable
import kotlinx.android.parcel.Parcelize
@Parcelize
data class OperationBean(
val op:String,
val a:Int,
val b:Int
) :Parcelable{
}
边栏推荐
- C语言日记 7 输入/输出格式控制
- CTF-XSS
- 我的第一篇博客
- vscode编译keil工程,烧录程序
- 我理解的学习金字塔
- checkPermissions Missing write access to /usr/local/lib
- 7.如何给RecyclerView添加Click和LongClick事件
- IllegalStateException: Room cannot verify the data integrity. Looks like you've changed schema but
- C语言——断言assert的使用
- YOLOv7 uses cloud GPU to train its own dataset