你的位置:首页 > 信息动态 > 新闻中心
信息动态
联系我们

Kotlin中var bundle = Bundle() 传值到Fragment()的arguments.getString出现问题

2021/12/22 3:12:23

Kotlin中var bundle = Bundle() 传值arguments.getString出现问题

import androidx.fragment.app.Fragment

Smart cast to 'Bundle' is impossible, because 'arguments' is a mutable property that could have been changed by this time

改用

var mStrategy:String = requireArguments().getString("strategy").toString()