Code example for ConcurrentModificationException

		return path;
	public void setOnBitmapLoadedListener(OnBitmapLoadedListener listener) {
		if(Looper.getMainLooper().getThread()!=Thread.currentThread()) {
			throw new ConcurrentModificationException("Cannot set OnBitmapLoadedListener outside of main thread");
		onBitmapLoadedListener = listener;
	public static BitmapLoaderTask createTaskOrCancel(Context context, String path, ImageView imageView, Bitmap placeholder, int width, int height) {
		if(context==null || imageView==null || placeholder==null) {
			return null; 
		if(cancelLoadTask(path, imageView)) {
			final BitmapLoaderTask task = new BitmapLoaderTask(path, imageView, width, height);
			final AsyncDrawable asyncDrawable = new AsyncDrawable(context.getResources(), placeholder, task);
			return task;
Connect your IDE to all the code out there  Get Codota for Java