Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

291
Views
Why Kotlin is Propting to create an extension function when set Glide error drawable from resource?

I am new in Kolin and I am converting my old codebase into Kotlin. I am getting an error while loading an image using Glide.

My Code

Glide.with(context)
.load(url)
.apply(options)
.error(R.drawable.ic_no_image)
.into(imageView)

Normally this is correct. But I am getting type mismatch error from Kotlin compiler in the error() builder method.

Required: RequestBuilder

Anyone has any solution without extension function.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I believe you want to create a class such as MyGlideModule which extends AppGlideModule and is annotated with @GlideModule Then instead of calling Glide.With(...) you call GlideApp.With(...) and these extra methods should be available.

@GlideModule
class MyGlideModule : AppGlideModule

See here: GlideModule

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!