尝试将Base64字符串附加到ImageView时出现NullPointer异常

时间:2016-03-08 09:51:08

标签: android

我正在从SqliteDatabase转换Base64图像数据并将其存储到字符串中并附加到imageview获取nullpointer异常代码

beloArrayList<Requirement_vo> vo=sqllietDatabaseConnection.getAllRequirmentData();
                       if(vo !=  null){
                       for(Requirement_vo vo1:vo){
                        String imageEncoded1=vo1.getFLAG1();
                        Log.v("ImageDetails====>", ""+imageEncoded1);
                        Log.v("ImageDetailsLat====>", ""+vo1.getFLAG2());

                        Log.v("ImageDetailsLan====>", ""+vo1.getFLAG3());
                         byte[] decodedString = Base64.decode(imageEncoded1,    Base64.DEFAULT);
                        Bitmap decodedByte =    BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length); 
                        display.setImageBitmap(decodedByte);

                    }

                }

0 个答案:

没有答案