第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

空指針異常,且 connection = (HttpURLConnection) url.openConnection();此時connection的狀態(tài)值為false??

空指針異常?。?!自己敲寫時,在imageloader中的onPostExecute方法中報空指針異常,此方法內(nèi)部的imageView和bitmap均不為空, 誰能幫忙看下是什么原因呢?謝謝,而且我debug時發(fā)現(xiàn)imageloader中的getBitmapFromUrl方法HttpURLConnection connection = (HttpURLConnection) url.openConnection();此時connection的狀態(tài)值為false,我運行正常的代碼時為true,網(wǎng)絡權限已經(jīng)給了,找了一天沒發(fā)現(xiàn)問題,求大神幫忙看下,不勝感激!??!
?? ??? ??? ??? ?connection.setConnectTimeout(5 * 1000); ?
?? ?@Override
?? ??? ?protected void onPostExecute(Bitmap bitmap) {
?? ??? ??? ?// TODO Auto-generated method stub
?? ??? ??? ?super.onPostExecute(bitmap);
//?? ??? ??? ?if (mImageView.getTag().equals(mUrl)) {
//?? ??? ??? ??? ?mImageView.setImageBitmap(bitmap);
//?? ??? ??? ?}
?? ??? ??? ?ImageView imageView? = (ImageView) mListView.findViewWithTag(mUrl);
?? ??? ??? ?if (imageView != null && bitmap != null) {
?? ??? ??? ??? ?mImageView.setImageBitmap(bitmap);
?? ??? ??? ?}
?? ??? ??? ?mTask.remove(this);
?? ??? ?}

?? ?}

正在回答

舉報

0/150
提交
取消
Android必學-異步加載
  • 參與學習       50617    人
  • 解答問題       326    個

了解Android中的異步加載處理方法,這是面試問的最多的知識點

進入課程

空指針異常,且 connection = (HttpURLConnection) url.openConnection();此時connection的狀態(tài)值為false??

我要回答 關注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號