-1
顯示java.lang.NullPointerException:嘗試在上一個com。示例空對象引用調用虛擬方法「無效android.widget.ImageView.setImageBitmap(android.graphics.Bitmap)」。 piker.MultipleShareActivity $ ImageAdapter1.getView(MultipleShareActivity.java:153)集bitmap_image和複選框在網格視圖
public View getView(int position, View convertView, ViewGroup parent) {
Log.e("122","after");
int width = getScreenWidth();
LinearLayout linearLayout;
linearLayout= (LinearLayout) findViewById(R.id.lins);
ImageView iv=new ImageView(con);
ImageView iv;
iv= (ImageView) findViewById(R.id.ims);
CheckBox cb=new CheckBox(con);
iv.setImageBitmap(mThumb[0]);// finding error in this line & mthumb is bitmap array//
linearLayout.addView(iv);
linearLayout.addView(cb);
return linearLayout;
}
檢查mThumb [0]是否爲空 –
顯然你的mThumb []是空的,確保你提出的問題不是垃圾。 – james