1. Add the following dependency to the build.gradle file:
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
  1. Add the following permissions to the AndroidManifest.xml file:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  1. Initialize the Universal Image Loader. This must be done before the first usage:
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(this)
    // ...
    .build();
ImageLoader.getInstance().init(config);

The full configuration options can be found here.