Я пытаюсь показать в виде списка в Android некоторые изображения, которые у меня есть в базе данных, и эта часть
@Override
public View getView (int position, View convertView, ViewGroup parent) {
LayoutInflater inflater = context.getLayoutInflater ();
View listViewItem = inflater.inflate (R.layout.layout, null, true);
TextView androids = (TextView) listViewItem.findViewById (R.id.tvandroidosnames);
// TextView textView = (TextView) listViewItem.findViewById (R.id.tvurl);
// textView.setText (urls [position]);
androidos.setText (androidosnames [position]);
ImageView image = (ImageView) listViewItem.findViewById (R.id.imgvw);
image.setImageBitmap (Bitmap.createScaledBitmap (bitmaps [position], 100, 50, false));
return listViewItem;
}
Это дает мне следующую ошибку:
Java.lang.NullPointerException: попытка вызвать виртуальный метод int android.graphics.Bitmap.getWidth () для нулевой ссылки на объект