请教一个URL的路径问题
img01 = (ImageView)findViewById(R.id.img01);String urlStr = "D:/workspace/May15_URL_Image/assets/pc.png";
try {
URL url = new URL(urlStr);
URLConnection urlConn = url.openConnection();
InputStream in = urlConn.getInputStream();
Bitmap bm = BitmapFactory.decodeStream(in);
img01.setImageBitmap(bm);
} catch (Exception e) {
e.printStackTrace();
}
这里的urlStr路径我直接显示到照片的盘符位置,为什么在手机上跑的时候却显示不出来呢???
也不见报错呀,请各位大大指点一下。
谢谢。 --------------------编程问答-------------------- 把图片拷到SD卡中再读吧同志。 --------------------编程问答--------------------
+++
补充:移动开发 , Android