Using the PictureSelector library - "Cannot resolve symbol GlideEngine"

Viewed 139

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?

1 Answers
Related