<p dir="auto">this is with in a library module, so it should not use the generated API</p>
<p dir="auto">upgrade to Glide 4.9.0</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="versions.glide = &quot;4.9.0&quot;

implementation &quot;com.github.bumptech.glide:glide:$versions.glide&quot;
kapt &quot;com.github.bumptech.glide:compiler:$versions.glide&quot;
implementation &quot;com.github.bumptech.glide:annotations:$versions.glide&quot;"><pre class="notranslate"><code class="notranslate">versions.glide = "4.9.0"

implementation "com.github.bumptech.glide:glide:$versions.glide"
kapt "com.github.bumptech.glide:compiler:$versions.glide"
implementation "com.github.bumptech.glide:annotations:$versions.glide"
</code></pre></div>
<p dir="auto">updated the code, no place is using GlideApp</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fun ImageView.loadImg(imageUrl: String) {

// 3.8.0
//    if (!TextUtils.isEmpty(imageUrl)) {
//        Glide.clear(this)
//
//        Glide.with(context).load(imageUrl)
//                .diskCacheStrategy(DiskCacheStrategy.ALL)
//                .placeholder(ColorDrawable(Color.LTGRAY))
//                .into(this)
//    }

///
// 4.+ code
 var requestOptions : RequestOptions = RequestOptions()
    .placeholder(ColorDrawable(Color.LTGRAY))
    .diskCacheStrategy(DiskCacheStrategy.ALL)

if (!TextUtils.isEmpty(imageUrl)) {
    Glide.with(context)
        .setDefaultRequestOptions(requestOptions)  
        .asBitmap()
        .load(imageUrl)
        .into(this)
    }
}

fun ImageView.clear() {
    Glide.with(this.context).clear(this)
}"><pre class="notranslate"><code class="notranslate">fun ImageView.loadImg(imageUrl: String) {

// 3.8.0
//    if (!TextUtils.isEmpty(imageUrl)) {
//        Glide.clear(this)
//
//        Glide.with(context).load(imageUrl)
//                .diskCacheStrategy(DiskCacheStrategy.ALL)
//                .placeholder(ColorDrawable(Color.LTGRAY))
//                .into(this)
//    }

///
// 4.+ code
 var requestOptions : RequestOptions = RequestOptions()
    .placeholder(ColorDrawable(Color.LTGRAY))
    .diskCacheStrategy(DiskCacheStrategy.ALL)

if (!TextUtils.isEmpty(imageUrl)) {
    Glide.with(context)
        .setDefaultRequestOptions(requestOptions)  
        .asBitmap()
        .load(imageUrl)
        .into(this)
    }
}

fun ImageView.clear() {
    Glide.with(this.context).clear(this)
}
</code></pre></div>
<p dir="auto">got crash at Glide.with()</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="java.lang.AbstractMethodError: abstract method &quot;void    com.bumptech.glide.module.RegistersComponents.registerComponents(android.content.Context, com.bumptech.glide.Glide, com.bumptech.glide.Registry)&quot;
at com.bumptech.glide.Glide.initializeGlide(Glide.java:270)
at com.bumptech.glide.Glide.initializeGlide(Glide.java:223)
at com.bumptech.glide.Glide.checkAndInitializeGlide(Glide.java:184)
at com.bumptech.glide.Glide.get(Glide.java:168)
at com.bumptech.glide.Glide.getRetriever(Glide.java:689)
at com.bumptech.glide.Glide.with(Glide.java:716)"><pre class="notranslate"><code class="notranslate">java.lang.AbstractMethodError: abstract method "void    com.bumptech.glide.module.RegistersComponents.registerComponents(android.content.Context, com.bumptech.glide.Glide, com.bumptech.glide.Registry)"
at com.bumptech.glide.Glide.initializeGlide(Glide.java:270)
at com.bumptech.glide.Glide.initializeGlide(Glide.java:223)
at com.bumptech.glide.Glide.checkAndInitializeGlide(Glide.java:184)
at com.bumptech.glide.Glide.get(Glide.java:168)
at com.bumptech.glide.Glide.getRetriever(Glide.java:689)
at com.bumptech.glide.Glide.with(Glide.java:716)
</code></pre></div>
<p dir="auto">if adding the</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@GlideModule
class DPAppGlideModule : AppGlideModule() {
    override fun isManifestParsingEnabled(): Boolean {
        return false
    }
}"><pre class="notranslate"><code class="notranslate">@GlideModule
class DPAppGlideModule : AppGlideModule() {
    override fun isManifestParsingEnabled(): Boolean {
        return false
    }
}
</code></pre></div>
<p dir="auto">it will work, but since this is a library module so it should not have this one.</p>
<p dir="auto">what might be the cause of AbstractMethodError: abstract method "void    com.bumptech.glide.module.RegistersComponents.registerComponents(android.content.Context, com.bumptech.glide.Glide, com.bumptech.glide.Registry)"?</p>
<p dir="auto">anything besides GlideApp should also be avoid?</p>
<p dir="auto">Hello,When I compile the program,I meet a trouble.</p>
<p dir="auto">The compiler remind me of:</p>
<p dir="auto">Error:Execution failed for task ':app:transformClassesWithJarMergingFor_DebugDebug'.</p>
<blockquote>
<p dir="auto">com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider.class</p>
</blockquote>
<p dir="auto"><strong>Glide Version</strong>: 3.7.0</p>
<p dir="auto">I hope you can reply me ,Thank you very much.</p>