13
代碼:如何解決SkImageDecoder ::廠返回null
URL url = new URL(bitmapurl);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setDoInput(true);
connection.connect();
InputStream input = connection.getInputStream();
bitmap[i] = BitmapFactory.decodeStream(input);
System.out.println("the bitmap is +bitmap[i]);
錯誤的logcat:
03-29 15:01:50.044: DEBUG/skia(238): --- SkImageDecoder::Factory returned null
the bitmap is null
這又如何解決?
我認爲它可以在存在連接問題時隨機彈出。我偶然用相同的圖像偶然發現了這種情況,大多數情況下它都會工作,有時只會失敗。所以它不可能與圖像有關,必須是網絡或其他東西。 – Matthias 2011-09-08 12:50:45
它不是重複的.... WITCH! – user123321 2012-02-02 18:30:33
在其他崗位我讀這一個解決我的問題: http://stackoverflow.com/questions/9188002/skimagedecoderfactory-returned-null – Fernando 2012-05-30 16:02:44