kotlin.KotlinNullPointerException在org.opencv.samples.facedetect.FdActivity.getNumLabels(FdActivity.kt:448)在org.opencv.samples.facedetect.FdActivity.onCameraFrame(FdActivity.kt:219)
protected val numLabels: Int
protected get() = labelList!!.size //this is where the nullpointer is detected
protected val numLabelsG: Int
protected get() = labelListG!!.size
try {
labelListG = loadLabelListG()
} catch (e: Exception) {
}
try {
labelList = loadLabelList() //this is where the nullpointer is detected
} catch (e: Exception) {
}
问题] >>
我将我的java文件转换为kotlin文件,并设法解决了一些错误,但是在启动我的应用程序时遇到了这个问题。为什么我总是收到kotlin.KotlinNullPointerException?