0
HY !!解析來自JSON圖片的問題
我有一個返回JSON對象與
鏈接到JSON解碼圖像的web服務:
我的Java代碼:
String im = json.getChannelImage();
if (!im.equals(null))
{
byte[] decodedString = Base64Coder.decode(im);
Bitmap bitmap = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);
iv.setImageBitmap(bitmap);
}
錯誤:
ERROR/Error(285): Length of Base64 encoded input string is not a multiple of 4.
我使用了一個名爲Base64Coder libary,因爲我想有API級別3
請幫