Skip to content Skip to sidebar Skip to footer

Image Not Loading Using The Novoda / Imageloader

I'm trying to load images from the internet using the ImageLoader library into a grid view. But, getting a null pointer exception at imageManager.getLoader().load(fView.pic);. Can

Solution 1:

First off, don't create another object of imagemanager in your adapter. Do StartApp.getImageLoader().getLoader().load(fView.pic);

Second off, a null pointer can easily be found by adding some null checks and/or logging if things are null or not. After that we can tell what object is null.

Example:

if(StartApp.getImageLoader().getLoader()!=null) {
    StartApp.getImageLoader().getLoader().load(fView.pic);
}

Solution 2:

Looks like you are not setting correctly the application class Make sure to declare the Application class in the manifest like :

    <application android:name="class" ...

You should verify that the onCreate it is executed, maybe put some log. You should never check for the ImageManager to be null, if it is null there is something wrong

Post a Comment for "Image Not Loading Using The Novoda / Imageloader"