<p dir="auto">Hi guys,<br>
I have a problem when I migrate glide from v3 to v4.3.1 in project, the GlideApp can't be generated.<br>
I'm sure that all the dependencies have been added.<br>
Is because the project has many glide v3 syntax error? If yes, how to fix it?<br>
Thank you very much!</p>
<p dir="auto"><strong>Glide Version/Integration library (if any)</strong>: 3.5.2<br>
<strong>Device/Android Version</strong>: HTC One M8. KitKat 4.4.4<br>
<strong>Issue details/Repro steps</strong>:<br>
My imageviews have a predefined size (90dp x 90dp, not using wrap_content).</p>
<p dir="auto">If I back out of the listview and reload it or scroll up and down, the images sometimes load correctly.</p>
<p dir="auto">I've double checked the image links and there's no issue with them either.</p>
<p dir="auto">Note: I'm using the viewholder pattern in my adapter to load images into my listview.</p>
<p dir="auto"><strong>Glide load line</strong>:<br>
Here's my adapter code:</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="ArrayList ItemArrayList;

if (view == null) {
    LayoutInflater inflater = (LayoutInflater) viewGroup.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    row = inflater.inflate(R.layout.item_row, viewGroup, false);
    holder = new ItemHolder(row);
    row.setTag(holder);
}

else {
    row = view;
    holder = (ItemHolder) row.getTag();
}

Glide.with(viewGroup.getContext()).load(ItemArrayList.get(position).getItemImage()).transform(new GlideCircleTransform(c)).error(R.drawable.mm_avatar).into(holder.itemImage);"><pre class="notranslate"><span class="pl-smi">ArrayList</span> <span class="pl-s1">ItemArrayList</span>;

<span class="pl-k">if</span> (<span class="pl-s1">view</span> == <span class="pl-c1">null</span>) {
    <span class="pl-smi">LayoutInflater</span> <span class="pl-s1">inflater</span> = (<span class="pl-smi">LayoutInflater</span>) <span class="pl-s1">viewGroup</span>.<span class="pl-en">getContext</span>().<span class="pl-en">getSystemService</span>(<span class="pl-smi">Context</span>.<span class="pl-c1">LAYOUT_INFLATER_SERVICE</span>);
    <span class="pl-s1">row</span> = <span class="pl-s1">inflater</span>.<span class="pl-en">inflate</span>(<span class="pl-smi">R</span>.<span class="pl-s1">layout</span>.<span class="pl-s1">item_row</span>, <span class="pl-s1">viewGroup</span>, <span class="pl-c1">false</span>);
    <span class="pl-s1">holder</span> = <span class="pl-k">new</span> <span class="pl-smi">ItemHolder</span>(<span class="pl-s1">row</span>);
    <span class="pl-s1">row</span>.<span class="pl-en">setTag</span>(<span class="pl-s1">holder</span>);
}

<span class="pl-k">else</span> {
    <span class="pl-s1">row</span> = <span class="pl-s1">view</span>;
    <span class="pl-s1">holder</span> = (<span class="pl-smi">ItemHolder</span>) <span class="pl-s1">row</span>.<span class="pl-en">getTag</span>();
}

<span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-s1">viewGroup</span>.<span class="pl-en">getContext</span>()).<span class="pl-en">load</span>(<span class="pl-smi">ItemArrayList</span>.<span class="pl-en">get</span>(<span class="pl-s1">position</span>).<span class="pl-en">getItemImage</span>()).<span class="pl-en">transform</span>(<span class="pl-k">new</span> <span class="pl-smi">GlideCircleTransform</span>(<span class="pl-s1">c</span>)).<span class="pl-en">error</span>(<span class="pl-smi">R</span>.<span class="pl-s1">drawable</span>.<span class="pl-s1">mm_avatar</span>).<span class="pl-en">into</span>(<span class="pl-s1">holder</span>.<span class="pl-s1">itemImage</span>);</pre></div>
<p dir="auto">After using adb debugging, I get the following error on failed image loads:</p>
<blockquote>
<p dir="auto">java.lang.IllegalStateException: Can't call reconfigure() on a recycled bitmap</p>
</blockquote>
<p dir="auto"><strong>Stack trace</strong>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    java.lang.IllegalStateException: Can't call reconfigure() on a recycled bitmap
            at android.graphics.Bitmap.checkRecycled(Bitmap.java:668)
            at android.graphics.Bitmap.reconfigure(Bitmap.java:460)
            at com.bumptech.glide.load.engine.bitmap_recycle.SizeConfigStrategy.get(SizeConfigStrategy.java:72)
            at com.bumptech.glide.load.engine.bitmap_recycle.LruBitmapPool.getDirty(LruBitmapPool.java:130)
            at com.bumptech.glide.load.resource.bitmap.Downsampler.downsampleWithSize(Downsampler.java:215)
            at com.bumptech.glide.load.resource.bitmap.Downsampler.decode(Downsampler.java:151)
            at com.bumptech.glide.load.resource.bitmap.StreamBitmapDecoder.decode(StreamBitmapDecoder.java:50)
            at com.bumptech.glide.load.resource.bitmap.StreamBitmapDecoder.decode(StreamBitmapDecoder.java:19)
            at com.bumptech.glide.load.resource.bitmap.ImageVideoBitmapDecoder.decode(ImageVideoBitmapDecoder.java:39)
            at com.bumptech.glide.load.resource.bitmap.ImageVideoBitmapDecoder.decode(ImageVideoBitmapDecoder.java:20)
            at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decodeBitmapWrapper(GifBitmapWrapperResourceDecoder.java:121)
            at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decodeStream(GifBitmapWrapperResourceDecoder.java:94)
            at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decode(GifBitmapWrapperResourceDecoder.java:71)
            at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decode(GifBitmapWrapperResourceDecoder.java:61)
            at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decode(GifBitmapWrapperResourceDecoder.java:22)
            at com.bumptech.glide.load.engine.DecodeJob.decodeFromSourceData(DecodeJob.java:190)
            at com.bumptech.glide.load.engine.DecodeJob.decodeSource(DecodeJob.java:177)
            at com.bumptech.glide.load.engine.DecodeJob.decodeFromSource(DecodeJob.java:128)
            at com.bumptech.glide.load.engine.EngineRunnable.decodeFromSource(EngineRunnable.java:122)
            at com.bumptech.glide.load.engine.EngineRunnable.decode(EngineRunnable.java:101)
            at com.bumptech.glide.load.engine.EngineRunnable.run(EngineRunnable.java:58)
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
            at java.util.concurrent.FutureTask.run(FutureTask.java:237)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            at java.lang.Thread.run(Thread.java:864)
            at com.bumptech.glide.load.engine.executor.FifoPriorityThreadPoolExecutor$DefaultThreadFactory$1.run(FifoPriorityThreadPoolExecutor.java:52)"><pre class="notranslate"><code class="notranslate">    java.lang.IllegalStateException: Can't call reconfigure() on a recycled bitmap
            at android.graphics.Bitmap.checkRecycled(Bitmap.java:668)
            at android.graphics.Bitmap.reconfigure(Bitmap.java:460)
            at com.bumptech.glide.load.engine.bitmap_recycle.SizeConfigStrategy.get(SizeConfigStrategy.java:72)
            at com.bumptech.glide.load.engine.bitmap_recycle.LruBitmapPool.getDirty(LruBitmapPool.java:130)
            at com.bumptech.glide.load.resource.bitmap.Downsampler.downsampleWithSize(Downsampler.java:215)
            at com.bumptech.glide.load.resource.bitmap.Downsampler.decode(Downsampler.java:151)
            at com.bumptech.glide.load.resource.bitmap.StreamBitmapDecoder.decode(StreamBitmapDecoder.java:50)
            at com.bumptech.glide.load.resource.bitmap.StreamBitmapDecoder.decode(StreamBitmapDecoder.java:19)
            at com.bumptech.glide.load.resource.bitmap.ImageVideoBitmapDecoder.decode(ImageVideoBitmapDecoder.java:39)
            at com.bumptech.glide.load.resource.bitmap.ImageVideoBitmapDecoder.decode(ImageVideoBitmapDecoder.java:20)
            at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decodeBitmapWrapper(GifBitmapWrapperResourceDecoder.java:121)
            at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decodeStream(GifBitmapWrapperResourceDecoder.java:94)
            at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decode(GifBitmapWrapperResourceDecoder.java:71)
            at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decode(GifBitmapWrapperResourceDecoder.java:61)
            at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decode(GifBitmapWrapperResourceDecoder.java:22)
            at com.bumptech.glide.load.engine.DecodeJob.decodeFromSourceData(DecodeJob.java:190)
            at com.bumptech.glide.load.engine.DecodeJob.decodeSource(DecodeJob.java:177)
            at com.bumptech.glide.load.engine.DecodeJob.decodeFromSource(DecodeJob.java:128)
            at com.bumptech.glide.load.engine.EngineRunnable.decodeFromSource(EngineRunnable.java:122)
            at com.bumptech.glide.load.engine.EngineRunnable.decode(EngineRunnable.java:101)
            at com.bumptech.glide.load.engine.EngineRunnable.run(EngineRunnable.java:58)
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
            at java.util.concurrent.FutureTask.run(FutureTask.java:237)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            at java.lang.Thread.run(Thread.java:864)
            at com.bumptech.glide.load.engine.executor.FifoPriorityThreadPoolExecutor$DefaultThreadFactory$1.run(FifoPriorityThreadPoolExecutor.java:52)
</code></pre></div>