您的位置:首页 > Web前端

Kotlin-Not enough information to infer parameter T in fun<T:View> findViewById(id: Int): T!

2017-10-13 17:41 676 查看
错误:
Type inference failed : Not enough information to infer parameter T in fun<T:View> findViewById(id: Int): T! Please specify it explicitly.

解决:

holder.btnInstall = convertView.findViewById(R.id.btn_install) as Button

改为
holder.btnInstall = convertView.findViewById<Button>(R.id.btn_install)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  kotlin
相关文章推荐