嗨,我正在尝试从 to 获取url
图像bitmap
。我有安卓 4.1 设备。new URL(). open connection().getInputStream());
当我在应用程序冻结上运行此代码时,然后强制关闭。任何想法?
runOnUiThread(new Runnable() {
public void run() {
String url = "http://netmera.com/cdn/app/file/netmera.com/series/img-48/1372262272227_89/medium";
try {
Bitmap bmp = BitmapFactory.decodeStream(new URL(url)
.openConnection().getInputStream());
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}