【发布时间】:2011-07-25 03:19:54
【问题描述】:
代码:
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
如何解决这个问题?
【问题讨论】:
-
我认为有连接问题时可以随机弹出。我用相同的图像偶然发现了这个,它大部分时间都可以工作,但有时会失败。所以不可能是和图片相关的东西,一定是网络什么的。
-
它不是重复的.... WITCH!
-
在其他帖子中我读到这个解决了我的问题:stackoverflow.com/questions/9188002/…
-
现在转到其他问题,并接受最重要的答案,向 SO 社区提供预期的反馈。
-
@tamil 你解决了吗?
标签: android