Java 如何在sqLite中修复:无法从CursorWindow读取第0行、第0列。在从光标访问数据之前,请确保光标已正确初始化

Java 如何在sqLite中修复:无法从CursorWindow读取第0行、第0列。在从光标访问数据之前,请确保光标已正确初始化,java,sqlite,android-studio,kotlin,android-sqlite,Java,Sqlite,Android Studio,Kotlin,Android Sqlite,我想从这个表中获取sqLite的数据 db.execSQL("create table cabling(Code text, note text, lat text, lng text, teamColor text, jobType text, image1 text, image2 text, image3 text, image4 text, image5 text, cable text, assawer text, ankor text, mwaser text, bu

我想从这个表中获取sqLite的数据

        db.execSQL("create table cabling(Code text, note text, lat text, lng text, teamColor text, jobType text, image1 text, image2 text, image3 text, image4 text, image5 text, cable text, assawer text, ankor text, mwaser text, building_no text)")
返回函数是

@SuppressLint("Recycle")
override fun returnCabling(db: SQLiteDatabase): ArrayList<CablingData> {
    val cur = db.rawQuery("select * from cabling", arrayOf())

    val cabling = ArrayList<CablingData>()
    cur.moveToFirst()

    while (!cur.isAfterLast) {
        cabling.add(
            CablingData(
                cur.getString(cur.getColumnIndex("Code")),
                cur.getString(cur.getColumnIndex("note")),
                cur.getString(cur.getColumnIndex("lat")),
                cur.getString(cur.getColumnIndex("lng")),
                cur.getString(cur.getColumnIndex("teamColor")),
                cur.getString(cur.getColumnIndex("jobType")),
                cur.getString(cur.getColumnIndex("image1")),
                cur.getString(cur.getColumnIndex("image2")),
                cur.getString(cur.getColumnIndex("image3")),
                cur.getString(cur.getColumnIndex("image4")),
                cur.getString(cur.getColumnIndex("image5")),
                cur.getString(cur.getColumnIndex("cable")),
                cur.getString(cur.getColumnIndex("assawer")),
                cur.getString(cur.getColumnIndex("ankor")),
                cur.getString(cur.getColumnIndex("mwaser")),
                cur.getString(cur.getColumnIndex("building_no"))
            )
        )

        AppLogger.log("cabling", cabling.toString())
        cur.moveToNext()
    }
    cur.close()
    return cabling
}
这是可行的,但如果我在select语句中写入所有元素,它将崩溃

从布线中选择代码、注释、lat、lng、teamColor、作业类型、图像1、图像2、图像3、图像4、图像5、电缆、assawer、ankor、mwaser、建筑物编号

上述说法行不通

谢谢大家的帮助


首先从设备上卸载应用程序,然后重新运行。我尝试了这个方法,但它不起作用。请执行最后一次while循环,以查找导致问题的列。所有这些图像列闻起来都像二进制大数据。Android sqlite CursorWinfow仅支持最多2兆字节的行。如何解决大小问题?
val cur2 = db.rawQuery("select Code, note, lat, lng from cabling", arrayOf())
    cur2.moveToFirst()
    while (!cur2.isAfterLast) {
        AppLogger.log("testststs", cur2.getString(cur2.getColumnIndex("Code")))

        cur2.moveToNext()

    }