Loading images in gridview [universal image loader]
<p>I'm trying to use the universal image loader to load images into a gridview but my app seems to be crashing right when the activity loads and I cant identify the problem. I'm loading the images from an array then calling the image adapter to populate them. </p>

<p>I debugged through the application but didn't see anything prominent in LogCat.</p>

<p>All help will be greatly appreciated :)</p>

<pre><code>public class MainActivity extends Activity {

    String[] imageUrls;

    DisplayImageOptions options;
    protected ImageLoader imageLoader = ImageLoader.getInstance();

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Bundle bundle = getIntent().getExtras();
        imageUrls = bundle.getStringArray(Extra.IMAGES);

        options = new DisplayImageOptions.Builder()
            .showStubImage(R.drawable.stub_image)
            .showImageForEmptyUri(R.drawable.image_for_empty_url)
            .cacheInMemory()
            .cacheOnDisc()
            .bitmapConfig(Bitmap.Config.RGB_565)
            .build();

        GridView gridView = (GridView) findViewById(R.id.gridview);
        gridView.setAdapter(new ImageAdapter());


    }

    public class ImageAdapter extends BaseAdapter {
        @Override
        public int getCount() {
            return imageUrls.length;
        }

        @Override
        public Object getItem(int position) {
            return null;
        }

        @Override
        public long getItemId(int position) {
            return position;
        }

        @Override
        public View getView(int position, View convertView, ViewGroup parent) {
            final ImageView imageView;
            if (convertView == null) {
                imageView = (ImageView) getLayoutInflater().inflate(R.layout.item_grid_image, parent, false);
            } else {
                imageView = (ImageView) convertView;
            }

            imageLoader.displayImage(imageUrls[position], imageView, options);

            return imageView;
        }
    }
}
</code></pre>

<p><strong>EDIT: Logcat Error: "AndroidRuntime(6789): java.lang.RuntimeException: ImageLoader must be init with configuration before using"</strong></p>
