Parameter specified as non-null is null method kotlin.jvm.internal.Intrinsics.checkNotNullParameter
问题描述
Android 的 Java代码通过Android Studio自动化转换Kotlin报错
java.lang.NullPointerException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter, parameter convertView
出现的地方
在编写ListVIew的适配器时,覆写BaseAdapter的 getView()
出现问题
修改之后
override fun getView(position: Int, convertView: View?, parent: ViewGroup): View { }
类似的问题
activity从Java转成Kotlin之后,发生以下错误,目标指向不明:
java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter savedInstanceState
问题原因:activity的onCreate方法中savedInstanceState为非null元素。
@Overrideprotected void onCreate(@NonNull Bundle savedInstanceState) {super.onCreate(savedInstanceState);}
解决问题:用kotlin重写的时候,也要是非null元素。
override fun onCreate(savedInstanceState: Bundle?) {super.onCreate(savedInstanceState)
}
Parameter specified as non-null is null method kotlin.jvm.internal.Intrinsics.checkNotNullParameter相关推荐
- Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter
Java自动转换Kotlin代码之后,编译出现的问题 原因在于有的函数的传参没有做允许空值处理,找到那个函数参数后加入?即可 eg. override fun bind(data: Any?) {do ...
- n-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter convertView
我这是把java转kotlin,报错提示: java.lang.IllegalArgumentException: Parameter specified as non-null is null: m ...
- Mybatis中的attempted to return null from a method with a primitive return type (int).异常
错误截图: org.apache.ibatis.binding.BindingException: Mapper method 'com.shop_demo.dao.AdminDAO.getAdmin ...
- attempted to return null from a method with a primitive return type (int).
错误产生的场景 dao层接口如下 int getResourceDataNumsByTitle(String title); mapper.xml 中sql语句如下 <select id=&qu ...
- MyBatis异常报告: Mapper method ‘com.dao.UserMapper.insert attempted to return null from a method with ……
错误名称:Mapper method 'com.dao.UserMapper.insert attempted to return null from a method with a primitiv ...
- Mybatis:Mapper method attempted to return null from a method with a primitive return type (int)
Mybatis中 Mapper method attempted to return null from a method with a primitive return type (int)错误 本 ...
- sql报错解决方案:attempted to return null from a method with a primitive return type (int)
问题现象 idea执行查询数量语句控制台报错:attempted to return null from a method with a primitive return type (int). 解决 ...
- Mapper method ‘com.xxx.dao.ActivityDao.update attempted to return null from a method with a primiti
500异常报告: Mapper method 'com.xxx.dao.ActivityDao.update attempted to return null from a method with a ...
- 关于mybatis的报错 attempted to return null from a method with a primitive return type (int)
https://blog.csdn.net/kisscatforever/article/details/77801060 一.前言 在往常敲代码的时候没有留意过int和Integer的区 ...
最新文章
- Asp.Net Core WebAPI使用Swagger时API隐藏与分组
- 【转】SharePoint 编程指南
- 【图像处理】直方图均衡化(附带Matlab及OpenCV3自编程实现代码)
- MySQL 8数据导入 MySQL 5.7
- 使用递归方法 删除文件夹及文件夹内文件
- 第十一讲 在ASP.NET中使用用户控件
- idea里查找maven的jar包冲突
- Atitit 登录票据安全法 目录 1.1. cookie对象规范	1 1.2. Cookie加解密	1 1.3. Cookie密文动态更换,根据一个时间3天比如	1 1.4. 服务端撤销key	1
- STC学习:导航按键与数字按键综合控制数码管
- 计算机电源的瓦数是什么,电脑的电源功率大小有区别吗?对电脑有什么影响吗?...
- 用matlab音频欠采样率时域采样,matlab时域采样定理.doc
- 基于token的多平台身份认证架构设计
- scara机器人dh参数表_scara机器人技术参数
- Opencv 16位深度图片显示并保存
- 【iOS】苹果登录Sign in with Apple
- Java毕业设计_基于javaweb的网上预约实验室管理系统的设计与实现
- JSON文件的读取操作详解
- es6 arry fill
- 利用python和tushare,统计股市每天上涨的概率
- javascript对输入框的字数限制(转自愚人码头)