androiduniversal-image-loader

Universal Image Loader not working after upgrade to new version 1.9.5


I am using the library Universal Image Loader. I moved to Android Studio and it is still working fine. But if I use a higher version than 1.9.1 I get errors in my code.

import com.nostra13.universalimageloader.core.assist.ImageLoadingListener;
import com.nostra13.universalimageloader.core.assist.SimpleImageLoadingListener;

"cannot resolve symbol" is the error that Android studio is showing me. Did they remove this from the library? I cannot find a hint in the changelog.

The problem is that "ImageLoadingListener" is not resolved any more and I cannot find a solution around it.

private ImageLoadingListener animateFirstListener = new AnimateFirstDisplayListener();

        private class ViewHolder {
            public TextView text;
            public ImageView image;
            public TextView count;
            public TextView counter;
        }

I added following to the gradle file:

dependencies {
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
}

Solution

  • They had changed the package for listner. You need to change your import to

    import com.nostra13.universalimageloader.core.listener.ImageLoadingListener;
    import com.nostra13.universalimageloader.core.listener.SimpleImageLoadingListener;