0
當我試圖從facebook url獲取位圖圖像時,它顯示位圖爲null。這是我的代碼。Android - BitMap Null來自URL
URL url = new URL("http://graph.facebook.com/100006480449004/picture?type=large");
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setDoInput(true);
connection.connect();
InputStream input = connection.getInputStream();
Bitmap myBitmap = BitmapFactory.decodeStream(input);
重定向顯然有此重定向。你可能需要告訴httpUrlConnection來關注它。 – njzk2