I am trying to use Glide to load images from url in my android app in java
Glide.with(holder.itemView.getContext())
.load(newsItem.getImageUrl())
.into(holder.imageView);
Glide is giving an error ‘Cannot resolve symbol ‘Glide” for which i tried adding dependencies in my build.gradle.kts (module:app) file and isn’t working for me, am i doing anything wrong here?
2
Answers
Your
build.gradle.kts
contains syntax errors that is why Android Studio fails to include Glide to the project.The error message is quite misleading, but judging by screenshot, you are using wrong type of quotes around strings. In KTS one needs
"
instead of'
first make these changes in ‘libs.versions.toml’
enter image description here
then in build.gradle.kts, make following changes
enter image description here