title: java.lang.IllegalStateException: You cannot call Glide.get() in registerComponents(), use the provided Glide instance instead -- Glide Version 4.9.0
body: <p>Migrated from Gilde 3.7.0 to Glide 4.9.0.</p>
  
  <p>Defined my MyAppGlideModule as below.</p>
  
  <pre><code>@GlideModule
  public  class MyAppGlideModule extends AppGlideModule {
      private static final int IMAGE_DISK_CACHE_MAX_SIZE = 250 * 1024 * 1024;
  
      @Override
      public void applyOptions(@NonNull final Context context, @NonNull GlideBuilder builder) {
          super.applyOptions(context, builder);
          builder.setDiskCache(new DiskLruCacheFactory(
              FileUtils.getCacheFile(context, false).getAbsolutePath() + File.separator + GLIDE_CACHE_PATH,
              IMAGE_DISK_CACHE_MAX_SIZE));
      //        builder.setMemoryCache(new LruResourceCache(customMemoryCacheSize));
          builder.setDefaultRequestOptions(new RequestOptions().format(DecodeFormat.PREFER_ARGB_8888));
      }
  
      @Override
      public void registerComponents(@NonNull Context context, @NonNull Glide glide, @NonNull Registry registry) {
      //        super.registerComponents(context, glide, registry);
          OkHttpClient client = new OkHttpClient();
          client.newBuilder().connectTimeout(15, TimeUnit.SECONDS)
              .addNetworkInterceptor(new TSImageRetryIntercepter(3))
              .readTimeout(15, TimeUnit.SECONDS);
          OkHttpUrlLoader.Factory factory = new OkHttpUrlLoader.Factory(client);
          registry.replace(GlideUrl.class, InputStream.class, factory);
      }
  
      @Override
      public boolean isManifestParsingEnabled() {
          return false;
      }
  }
  </code></pre>
  
  <p>When I run code which is loading image as below</p>
  
  <pre><code>Glide.with(mContext)
                  .load(imageBean.getGlideUrl())
                  .override(with, height)
                  .diskCacheStrategy(DiskCacheStrategy.DATA)
                  .dontAnimate()
                  .placeholder(R.drawable.shape_default_image)
                  .diskCacheStrategy(DiskCacheStrategy.ALL)
                  .error(R.drawable.shape_default_image)
                  .into(view);
  </code></pre>
  
  <p>getting following error.</p>
  
  <pre><code>Process: com.my.package.debug, PID: 5561
  java.lang.IllegalStateException: You cannot call Glide.get() in registerComponents(), use the provided Glide instance instead
      at com.bumptech.glide.Glide.checkAndInitializeGlide(Glide.java:180)
      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)
      at com.my.package.list.adapter.DynamicListItemForShorVideo.initVideoView(DynamicListItemForShorVideo.java:106)
      at com.my.package.list.adapter.DynamicListItemForShorVideo.convert(DynamicListItemForShorVideo.java:77)
      at com.my.package.list.adapter.DynamicListItemForShorVideo.convert(DynamicListItemForShorVideo.java:45)
      at com.my.package.recyclerview.base.ItemViewDelegateManager.convert(ItemViewDelegateManager.java:93)
      at com.my.package.recyclerview.MultiItemTypeAdapter.convert(MultiItemTypeAdapter.java:55)
      at com.my.package.recyclerview.MultiItemTypeAdapter.onBindViewHolder(MultiItemTypeAdapter.java:99)
      at com.my.package.recyclerview.MultiItemTypeAdapter.onBindViewHolder(MultiItemTypeAdapter.java:17)
      at com.my.package.recyclerview.wrapper.HeaderAndFooterWrapper.onBindViewHolder(HeaderAndFooterWrapper.java:76)
      at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:6781)
      at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:6823)
      at android.support.v7.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5752)
      at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6019)
      at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5858)
      at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5854)
      at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2230)
      at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1557)
      at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1517)
      at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:612)
      at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3924)
      at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3641)
      at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:4194)
      at android.view.View.layout(View.java:20672)
      at android.view.ViewGroup.layout(ViewGroup.java:6194)
      at com.my.package.layout.SmartRefreshLayout.onLayout(SmartRefreshLayout.java:623)
      at android.view.View.layout(View.java:20672)
      at android.view.ViewGroup.layout(ViewGroup.java:6194)
      at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1083)
      at android.view.View.layout(View.java:20672)
      at android.view.ViewGroup.layout(ViewGroup.java:6194)
      at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
      at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
      at android.view.View.layout(View.java:20672)
      at android.view.ViewGroup.layout(ViewGroup.java:6194)
      at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
      at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
      at android.view.View.layout(View.java:20672)
      at android.view.ViewGroup.layout(ViewGroup.java:6194)
      at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
      at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
      at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
      at android.view.View.layout(View.java:20672)
      at android.view.ViewGroup.layout(ViewGroup.java:6194)
      at android.support.v4.view.ViewPager.onLayout(ViewPager.java:1775)
      at android.view.View.layout(View.java:20672)
      at android.view.ViewGroup.layout(ViewGroup.java:6194)
      at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1083)
  </code></pre>