<p dir="auto">in the new version of the Glide 4.3 i'm trying to use it but it crash whenver i use it and whatever context i passed to it</p>
<p dir="auto">this is the error showed to me</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;"><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)"
</code></pre></div>
<p dir="auto">this is my code i tired</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Glide.with(getApplicationContext()).
            load(url)
            .into(imageView);"><pre class="notranslate"><code class="notranslate">Glide.with(getApplicationContext()).
            load(url)
            .into(imageView);
</code></pre></div>
<p dir="auto">and</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="   Glide.with(getContext()).
            load(url)
            .into(imageView);"><pre class="notranslate"><code class="notranslate">   Glide.with(getContext()).
            load(url)
            .into(imageView);
</code></pre></div>
<p dir="auto">and it give me that warning</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="W/Glide: Failed to find GeneratedAppGlideModule. You should include an annotationProcessor compile dependency on com.github.bumptech.glide:compiler in your application and a @GlideModule annotated AppGlideModule implementation or LibraryGlideModules will be silently ignored"><pre class="notranslate"><code class="notranslate">W/Glide: Failed to find GeneratedAppGlideModule. You should include an annotationProcessor compile dependency on com.github.bumptech.glide:compiler in your application and a @GlideModule annotated AppGlideModule implementation or LibraryGlideModules will be silently ignored
</code></pre></div>
<p dir="auto">and the code in lib in gradle</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="compile 'com.github.bumptech.glide:glide:4.3.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.3.1'"><pre class="notranslate"><code class="notranslate">compile 'com.github.bumptech.glide:glide:4.3.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.3.1'
</code></pre></div>
<p dir="auto"><a href="https://stackoverflow.com/questions/47327760/glide-crash-because-of-context-4-3-1" rel="nofollow">i posted it into stackoverflow also</a></p>
<p dir="auto"><strong>Glide Version</strong>: 4.0.0-RC0<br>
<strong>Integration libraries</strong>: okhttp3-integration</p>
<p dir="auto">In my gradle:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    compile 'com.github.bumptech.glide:glide:4.0.0-RC0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC0'
    compile ('com.github.bumptech.glide:okhttp3-integration:1.5.0@aar'){
        exclude group: 'glide-parent'
    }"><pre class="notranslate"><code class="notranslate">    compile 'com.github.bumptech.glide:glide:4.0.0-RC0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC0'
    compile ('com.github.bumptech.glide:okhttp3-integration:1.5.0@aar'){
        exclude group: 'glide-parent'
    }
</code></pre></div>
<p dir="auto">My new Glide configuration:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@GlideModule
public class GlideConfiguration extends AppGlideModule {
    @Override
    public void applyOptions(Context context, GlideBuilder builder) {
        // Apply options to the builder here.
        RequestOptions requestOptions = new RequestOptions();
        requestOptions.format(DecodeFormat.PREFER_ARGB_8888);
        builder.setDefaultRequestOptions(requestOptions);
    }

    @Override
    public void registerComponents(Context context, Registry registry) {
        final OkHttpClient.Builder builder = RestCoreRetrofit.getInitialOkHttpClientBuilder();
        registry.append(GlideUrl.class, InputStream.class, new OkHttpUrlLoader.Factory(builder.build()));
    }
}"><pre class="notranslate"><code class="notranslate">@GlideModule
public class GlideConfiguration extends AppGlideModule {
    @Override
    public void applyOptions(Context context, GlideBuilder builder) {
        // Apply options to the builder here.
        RequestOptions requestOptions = new RequestOptions();
        requestOptions.format(DecodeFormat.PREFER_ARGB_8888);
        builder.setDefaultRequestOptions(requestOptions);
    }

    @Override
    public void registerComponents(Context context, Registry registry) {
        final OkHttpClient.Builder builder = RestCoreRetrofit.getInitialOkHttpClientBuilder();
        registry.append(GlideUrl.class, InputStream.class, new OkHttpUrlLoader.Factory(builder.build()));
    }
}
</code></pre></div>
<p dir="auto">For information getInitialOkHttpClientBuilder():</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="public static OkHttpClient.Builder getInitialOkHttpClientBuilder() {
        OkHttpClient.Builder httpClient = new OkHttpClient.Builder();

        // Setup timeouts
        httpClient.connectTimeout(20, TimeUnit.SECONDS);
        httpClient.readTimeout(60, TimeUnit.SECONDS);
        httpClient.writeTimeout(60, TimeUnit.SECONDS);

        return httpClient;
    }"><pre class="notranslate"><code class="notranslate">public static OkHttpClient.Builder getInitialOkHttpClientBuilder() {
        OkHttpClient.Builder httpClient = new OkHttpClient.Builder();

        // Setup timeouts
        httpClient.connectTimeout(20, TimeUnit.SECONDS);
        httpClient.readTimeout(60, TimeUnit.SECONDS);
        httpClient.writeTimeout(60, TimeUnit.SECONDS);

        return httpClient;
    }
</code></pre></div>
<p dir="auto">So, I've migrated v3 to v4 (<a href="http://bumptech.github.io/glide/doc/migrating.html" rel="nofollow">http://bumptech.github.io/glide/doc/migrating.html</a>). Migration and build are successful, but when I start my App, I have this crash now directly from the first GlideApp calling:</p>
<p dir="auto">In my fragment:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="GlideApp.with(this)
                    .load(resourceId)
                    .into(mBgImageView);"><pre class="notranslate"><code class="notranslate">GlideApp.with(this)
                    .load(resourceId)
                    .into(mBgImageView);
</code></pre></div>
<blockquote>
<p dir="auto">java.lang.AbstractMethodError: abstract method "void com.bumptech.glide.module.RegistersComponents.registerComponents(android.content.Context, com.bumptech.glide.Registry)"<br>
at com.bumptech.glide.Glide.initGlide(Glide.java:217)<br>
at com.bumptech.glide.Glide.get(Glide.java:154)<br>
at com.bumptech.glide.Glide.getRetriever(Glide.java:513)<br>
at com.bumptech.glide.Glide.with(Glide.java:585)<br>
at com.myapp.util.GlideApp.with(GlideApp.java:92)</p>
</blockquote>
<p dir="auto">I can't understand why. I checked several times the documentation.</p>
<p dir="auto">Thank you very much for your support guys!</p>