'Using the PictureSelector library - "Cannot resolve symbol GlideEngine"

I'm using this picture selecting library

https://github.com/LuckSiege/PictureSelector

but I'm having trouble even getting the basic example to work.

repositories {
  google()
  mavenCentral()
}

dependencies {
  implementation 'io.github.lucksiege:pictureselector:v3.0.9'
}

Dependencies added.

Using the sample code:

PictureSelector.create(this)
   .openGallery(SelectMimeType.ofImage())
   .setImageEngine(GlideEngine.createGlideEngine())
   .forResult(new OnResultCallbackListener<LocalMedia>() {
      @Override
      public void onResult(ArrayList<LocalMedia> result) {

      }

      @Override
      public void onCancel() {

     }
});

Getting a "Cannot resolve symbol GlideEngine"

enter image description here

I tried invalidating and clearing caches, cleaning and rebuilding. Still not sure why it's happening.

Using it without the line .setImageEngine gives me the error

java.lang.NullPointerException: imageEngine is null,Please implement ImageEngine
        at com.luck.picture.lib.basic.PictureSelectionModel.forResult

Have tried googling "Cannot resolve symbol GlideEngine" and searching the library's github issues, but no such issue. Quite lost at this point. Anyone have an idea of what's going wrong?



Solution 1:[1]

Maybe I'm dumb or they just have bad documentation because no where does it say you need to create your own GlideEngine.Java

Thanks to this post

https://ourcodeworld.com/articles/read/914/how-to-create-an-image-video-picker-with-preview-using-the-matisse-library-for-android-with-glide-4

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 DIRTY DAVE