已收集的对象无法评估ContentValues.values.tostring()

Rah*_*wal 5 android android-sqlite content-values

任何人都可以告诉我这是什么.我在数据库中添加数据时出现此错误.它只发生在一个特定的行上.我试着通过互联网找到答案或理由.但是徒劳无功 截图 调试时的屏幕截图

public void FunSetVisitorDetails(String strResult) {
    Log.d(TAG, "Get Visitor Details started.");
    if (!strResult.equalsIgnoreCase("NA") && !strResult.equalsIgnoreCase("NI")) {
        SQLiteDatabase database = getWritableDatabase();
        database.delete("TBL_VISITOR_MASTER", null, null);
            String[] strResultData = strResult.split("#");
            for (int index = 0; index < strResultData.length; index++) {
                String[] strRowData = strResultData[index].split(",");
                ContentValues values = new ContentValues();
                values.put("VISITORID", strRowData[0]);
                values.put("MEMBERID", strRowData[1]);
                values.put("TEAMID", strRowData[2]);
                values.put("CATEGORY", strRowData[3]);
                values.put("NAME", strRowData[4]);
                values.put("COMPNAME", strRowData[5]);
                values.put("SPECIALIZED1", strRowData[6]);
                values.put("SPECIALIZED2", strRowData[7]);
                values.put("SPECIALIZED3", strRowData[8]);
                values.put("SPECIALIZED4", strRowData[9]);
                values.put("SPECIALIZED5", strRowData[10]);
                values.put("CLIENT1", strRowData[11]);
                values.put("CLIENT2", strRowData[12]);
                values.put("CLIENT3", strRowData[13]);
                values.put("CLIENT4", strRowData[14]);
                values.put("CLIENT5", strRowData[15]);
                values.put("ASK", strRowData[16]);
                values.put("GIVE", strRowData[17]);
                values.put("TAGLINE", strRowData[18]);
                values.put("EMAIL", strRowData[19]);
                values.put("MOBILE", strRowData[20]);
                values.put("WEBSITE", strRowData[21]);
                values.put("LOCATION", strRowData[22]);
                try{ 
                    values.put("COMP_LOGO", strRowData[23]);// it is happening when adding the logo and image below. there is no exception thrown as well.
                    values.put("PERSON_IMAGE", strRowData[24]);
                } catch (Exception e){
                    e.printStackTrace();
                }

                database.insert("TBL_VISITOR_MASTER", null, values);
            }
Run Code Online (Sandbox Code Playgroud)

Ria*_*iad 0

我猜是保存图片的时候出错了。您需要保存特定行的位图图像。因此,将列创建为并保存其BLOB图像。bytes

你会发现很多像这样的教程。