Pues estoy intentando mostrar en una listview en android unas imagenes que tengo en una base de datos y esta parte
@Override
public View getView(int position, View convertView, ViewGroup parent) {
LayoutInflater inflater = context.getLayoutInflater();
View listViewItem = inflater.inflate(R.layout.layout, null, true);
TextView androidos = (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;
}
Me da el siguiente error:
java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference
Como puedo solucionarlo? Un saludo, gracias