<p dir="auto"><strong>Glide Version</strong>:</p>

<p dir="auto"><strong>Integration libraries</strong>:</p>

<p dir="auto"><strong>Device/Android Version</strong>:</p>

<p dir="auto"><strong>Issue details / Repro steps / Use case background</strong>:</p>

<p dir="auto"><strong>Glide load line / <code class="notranslate">GlideModule</code> (if any) / list Adapter code (if any)</strong>:</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Glide.with(iv.getContext())
                .load(url)
                .placeholder(R.mipmap.avatar_default)
                .error(R.mipmap.avatar_default)
                .diskCacheStrategy(DiskCacheStrategy.NONE)
                .transform(new GlideCircleTransform(iv.getContext()))
                .into(iv);"><pre class="notranslate"><span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-s1">iv</span>.<span class="pl-en">getContext</span>())
                .<span class="pl-en">load</span>(<span class="pl-s1">url</span>)
                .<span class="pl-en">placeholder</span>(<span class="pl-smi">R</span>.<span class="pl-s1">mipmap</span>.<span class="pl-s1">avatar_default</span>)
                .<span class="pl-en">error</span>(<span class="pl-smi">R</span>.<span class="pl-s1">mipmap</span>.<span class="pl-s1">avatar_default</span>)
                .<span class="pl-en">diskCacheStrategy</span>(<span class="pl-smi">DiskCacheStrategy</span>.<span class="pl-c1">NONE</span>)
                .<span class="pl-en">transform</span>(<span class="pl-k">new</span> <span class="pl-smi">GlideCircleTransform</span>(<span class="pl-s1">iv</span>.<span class="pl-en">getContext</span>()))
                .<span class="pl-en">into</span>(<span class="pl-s1">iv</span>);</pre></div>

<p dir="auto"><strong>Layout XML</strong>:</p>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;FrameLayout xmlns:android=&quot;..."><pre class="notranslate">&lt;<span class="pl-ent">FrameLayout</span> <span class="pl-e">xmlns</span><span class="pl-e">:</span><span class="pl-e">android</span>=<span class="pl-s"><span class="pl-pds">"</span>...</span></pre></div>

<p dir="auto"><strong>Stack trace / LogCat</strong>:</p>
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="paste stack trace and/or log here"><pre class="notranslate"><span class="pl-en">paste</span> <span class="pl-en">stack</span> <span class="pl-en">trace</span> <span class="pl-k">and</span>/<span class="pl-en">or</span> <span class="pl-en">log</span> <span class="pl-en">here</span></pre></div>
<p dir="auto">I get the following error when trying to load an image from assets into ImageView after app was closed and restarted:</p>
<blockquote>
<p dir="auto">D/skia: --- SkImageDecoder::Factory returned null</p>
</blockquote>
<p dir="auto">The scenario in which this issue appears:</p>
<p dir="auto">Android 5.0.1 (also tried on 5.1.1 - same issue)</p>
<ol dir="auto">
<li>Start app</li>
<li>Load animated image from assets into ImageView (image is loaded fine)</li>
<li>Make sure activity is destroyed</li>
<li>Restart activity</li>
<li>Try to load same image - get the above-mentioned errors</li>
</ol>
<p dir="auto">However (!), if I don't load image in step 2, but just close and restart app, and load image in step 5, there is no error - image is loaded fine.</p>
<p dir="auto">Here is my code for loading image:</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Glide.with(applicationContext)
                .using(new AssetUriLoader(applicationContext))
                .load(Uri.parse(assetPath))
                .diskCacheStrategy(DiskCacheStrategy.ALL)
                .into(imageView);"><pre class="notranslate"><span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-s1">applicationContext</span>)
                .<span class="pl-en">using</span>(<span class="pl-k">new</span> <span class="pl-smi">AssetUriLoader</span>(<span class="pl-s1">applicationContext</span>))
                .<span class="pl-en">load</span>(<span class="pl-smi">Uri</span>.<span class="pl-en">parse</span>(<span class="pl-s1">assetPath</span>))
                .<span class="pl-en">diskCacheStrategy</span>(<span class="pl-smi">DiskCacheStrategy</span>.<span class="pl-c1">ALL</span>)
                .<span class="pl-en">into</span>(<span class="pl-s1">imageView</span>);</pre></div>
<p dir="auto">The AssetUriLoader is a custom loader suggested by vpratfr in the following ticket:</p>
<p dir="auto"><a href="https://github.com/bumptech/glide/issues/155" data-hovercard-type="issue" data-hovercard-url="/bumptech/glide/issues/155/hovercard">Loading images from assets</a></p>
<p dir="auto">The ImageView is created programmatically:</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(mImageViewWidth, mImageViewHeight);
ImageView imageView = new ImageView(getActivity());
params.leftMargin = 100;
params.topMargin = 100;
rl.addView(imageView, params);"><pre class="notranslate"><span class="pl-smi">RelativeLayout</span>.<span class="pl-smi">LayoutParams</span> <span class="pl-s1">params</span> = <span class="pl-k">new</span> <span class="pl-smi">RelativeLayout</span>.<span class="pl-smi">LayoutParams</span>(<span class="pl-s1">mImageViewWidth</span>, <span class="pl-s1">mImageViewHeight</span>);
<span class="pl-smi">ImageView</span> <span class="pl-s1">imageView</span> = <span class="pl-k">new</span> <span class="pl-smi">ImageView</span>(<span class="pl-en">getActivity</span>());
<span class="pl-s1">params</span>.<span class="pl-s1">leftMargin</span> = <span class="pl-c1">100</span>;
<span class="pl-s1">params</span>.<span class="pl-s1">topMargin</span> = <span class="pl-c1">100</span>;
<span class="pl-s1">rl</span>.<span class="pl-en">addView</span>(<span class="pl-s1">imageView</span>, <span class="pl-s1">params</span>);</pre></div>
<p dir="auto">If someone had this error after app is restarted, and found a solution, help would be greatly appreciated.</p>