How do I add an image to an object in Algolia?

I can’t seem to find in their docs explanation about how to add an image to an object.

I am using the SearchBox and hits widgets provided by algolia. Everything works just find and all the text of each object shows just fine in my search results. But I tried to add an image to each object and I can’t make it to work.

Together with the rest of the data, I’ve save another field called photo with a link to the image. This is an example object.

  "title": "Visas & immigration laws",
  "description": "Visas are never easy. Relocating is even harder. Ask questions about the process and share your acquired knowledge ",
  "members": 1,
  "photo": "",
  "objectID": "m8xvYz4tpVUYshv7CVa2"

Then in the layout I use to load each object into, I’ve added this to the imageView: algolia:attribute='@{"photo"}'

SO the whole view is like this:


And when I try to run it, I get this error:

java.lang.NoSuchMethodError: No virtual method placeholder(Landroid/graphics/drawable/Drawable;)Lcom/bumptech/glide/request/RequestOptions; in class Lcom/bumptech/glide/request/RequestOptions; or its super classes (declaration of 'com.bumptech.glide.request.RequestOptions' appears in /data/app/com.republicera-e16RS4-1ecyLJYkxubMq8Q==/split_lib_dependencies_apk.apk)

It says aoething about Glide, which I am using in my app, but not in this fragment, so I am confused about it. Does the Algolia widget uses Glide?

Can anyone please tell e what am I doing wrong? I can’t find an explanation for handling images in Algolia.

*Tried with a regular image view and I get the same error.


Thank you for using Algolia.

We just released a version 2.0.0 of InstantSearch for Android. This is a rewrite from scratch using Kotlin as development language.

We recommend you update to this version, as many things have changed to make it easier to implement Algolia.

To get started using 2.0.1, please read this guide.

As we don’t use databinding anymore, you won’t face the issue you are describing. You will be able to use Glide to load images as you usually do.

Best regard,