这是我的代码
{
@SuppressLint("NewApi")
public static Bitmap getbmp(String src)
{
Bitmap bm = null;
try ( InputStream is = new URL( src ).openStream() )
{
bm = BitmapFactory.decodeStream( is );
}
catch (IOException e)
{
e.printStackTrace();
Log.e("Exception",e.getMessage());
return null;
}
return bm;
}
}
然后我称它为抛出
无法解码流:fileNotFoundException
答案 0 :(得分:0)
试试这个:
bm = BitmapFactory.decodeStream((InputStream) new URL(src).getContent());