<p dir="auto">I added the glide-3.6.1.jar and YouTubeAndroidPlayerApi.jar to my project,<br>
Before adding to glide , the youtube player was working clearly, when I added glide, something went wrong and when I try to open my YouTubePlayerFrag, onCreate() method I couldn't inflate my xml.</p>
<p dir="auto">When I remove the glide, everything return normal.</p>
<p dir="auto">How to set background process as 0<br>
<a href="http://www.tomsguide.com/faq/id-2316489/limit-background-process-android-device.html" rel="nofollow">http://www.tomsguide.com/faq/id-2316489/limit-background-process-android-device.html</a></p>
<p dir="auto">A fragment in activity and execute below.</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="ImageView imageView=(ImageView)getView().findViewById(view, R.id.attachment);
Glide.with(activity).load(url).asBitmap().into(imageView);"><pre class="notranslate"><span class="pl-smi">ImageView</span> <span class="pl-s1">imageView</span>=(<span class="pl-smi">ImageView</span>)<span class="pl-en">getView</span>().<span class="pl-en">findViewById</span>(<span class="pl-s1">view</span>, <span class="pl-smi">R</span>.<span class="pl-s1">id</span>.<span class="pl-s1">attachment</span>);
<span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-s1">activity</span>).<span class="pl-en">load</span>(<span class="pl-s1">url</span>).<span class="pl-en">asBitmap</span>().<span class="pl-en">into</span>(<span class="pl-s1">imageView</span>);</pre></div>
<p dir="auto">It's everything well. The image view display picture correctly.</p>
<p dir="auto">But I press home key to exit app and next step enter the other app and exit after launched.</p>
<p dir="auto">At latest, I return to my app and crash right now.</p>
<p dir="auto">I try modify</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Glide.with(activity).load(url).asBitmap().into(imageView);"><pre class="notranslate"><span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-s1">activity</span>).<span class="pl-en">load</span>(<span class="pl-s1">url</span>).<span class="pl-en">asBitmap</span>().<span class="pl-en">into</span>(<span class="pl-s1">imageView</span>);</pre></div>
<p dir="auto">to</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Glide.with(fragment).load(url).asBitmap().into(imageView);"><pre class="notranslate"><span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-s1">fragment</span>).<span class="pl-en">load</span>(<span class="pl-s1">url</span>).<span class="pl-en">asBitmap</span>().<span class="pl-en">into</span>(<span class="pl-s1">imageView</span>);</pre></div>
<p dir="auto">It still crash again.</p>
<p dir="auto">I comment</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="//Glide.with(activity).load(url).asBitmap().into(imageView);"><pre class="notranslate"><span class="pl-c">//Glide.with(activity).load(url).asBitmap().into(imageView);</span></pre></div>
<p dir="auto">and run the above flow. It is everything well.</p>
<p dir="auto">My device is LG G3 Android 5.0.1</p>
<p dir="auto">It display msg about</p>
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xxx.app/com.xxx.app.child.activity.SendMessageActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2305)
   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2365)
   at android.app.ActivityThread.access$800(ActivityThread.java:148)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1283)
   at android.os.Handler.dispatchMessage(Handler.java:102)
   at android.os.Looper.loop(Looper.java:135)
   at android.app.ActivityThread.main(ActivityThread.java:5272)
   at java.lang.reflect.Method.invoke(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:372)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704)
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:763)
   at android.view.LayoutInflater.inflate(LayoutInflater.java:482)
   at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
   at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
   at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:249)
   at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:106)
   at com.oshare.app.core.ChildActionBarActivity.onCreate(ChildActionBarActivity.java:13)
   at android.app.Activity.performCreate(Activity.java:5977)
   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2258)
   ... 10 more
Caused by: java.lang.IllegalStateException: Fragment com.oshare.fragment.message.SendMessageFragment did not create a view.
   at android.support.v4.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2200)
   at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:300)
   at android.support.v7.app.AppCompatDelegateImplV7.callActivityOnCreateView(AppCompatDelegateImplV7.java:838)
   at android.support.v7.app.AppCompatDelegateImplV11.callActivityOnCreateView(AppCompatDelegateImplV11.java:34)
   at android.support.v7.app.AppCompatDelegateImplV7.onCreateView(AppCompatDelegateImplV7.java:826)
   at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44)
   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:725)
   ... 19 more"><pre class="notranslate"><span class="pl-en">java</span><span class="pl-kos">.</span><span class="pl-en">lang</span><span class="pl-kos">.</span><span class="pl-en">RuntimeException</span>: <span class="pl-en">Unable</span> <span class="pl-en">to</span> <span class="pl-en">start</span> <span class="pl-en">activity</span> <span class="pl-en">ComponentInfo</span><span class="pl-kos">{</span><span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">xxx</span><span class="pl-kos">.</span><span class="pl-en">app</span>/<span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">xxx</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">child</span><span class="pl-kos">.</span><span class="pl-en">activity</span><span class="pl-kos">.</span><span class="pl-en">SendMessageActivity</span><span class="pl-kos">}</span>: <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">view</span><span class="pl-kos">.</span><span class="pl-en">InflateException</span>: <span class="pl-en">Binary</span> <span class="pl-en">XML</span> <span class="pl-en">file</span> <span class="pl-en">line</span> <span class="pl-c">#2: Error inflating class fragment</span>
   <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">ActivityThread</span><span class="pl-kos">.</span><span class="pl-en">performLaunchActivity</span><span class="pl-kos">(</span><span class="pl-v">ActivityThread</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:2305</span><span class="pl-kos">)</span>
   <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">ActivityThread</span><span class="pl-kos">.</span><span class="pl-en">handleLaunchActivity</span><span class="pl-kos">(</span><span class="pl-v">ActivityThread</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:2365</span><span class="pl-kos">)</span>
   <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">ActivityThread</span><span class="pl-kos">.</span><span class="pl-en">access</span>$800<span class="pl-kos">(</span><span class="pl-v">ActivityThread</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:148</span><span class="pl-kos">)</span>
   <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">ActivityThread</span>$H<span class="pl-kos">.</span><span class="pl-en">handleMessage</span><span class="pl-kos">(</span><span class="pl-v">ActivityThread</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:1283</span><span class="pl-kos">)</span>
   <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">os</span><span class="pl-kos">.</span><span class="pl-en">Handler</span><span class="pl-kos">.</span><span class="pl-en">dispatchMessage</span><span class="pl-kos">(</span><span class="pl-v">Handler</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:102</span><span class="pl-kos">)</span>
   <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">os</span><span class="pl-kos">.</span><span class="pl-en">Looper</span><span class="pl-kos">.</span><span class="pl-en">loop</span><span class="pl-kos">(</span><span class="pl-v">Looper</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:135</span><span class="pl-kos">)</span>
   <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">ActivityThread</span><span class="pl-kos">.</span><span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-v">ActivityThread</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:5272</span><span class="pl-kos">)</span>
   <span class="pl-en">at</span> <span class="pl-en">java</span><span class="pl-kos">.</span><span class="pl-en">lang</span><span class="pl-kos">.</span><span class="pl-en">reflect</span><span class="pl-kos">.</span><span class="pl-en">Method</span><span class="pl-kos">.</span><span class="pl-en">invoke</span><span class="pl-kos">(</span><span class="pl-en">Native</span> <span class="pl-v">Method</span><span class="pl-kos">)</span>
   <span class="pl-en">at</span> <span class="pl-en">java</span><span class="pl-kos">.</span><span class="pl-en">lang</span><span class="pl-kos">.</span><span class="pl-en">reflect</span><span class="pl-kos">.</span><span class="pl-en">Method</span><span class="pl-kos">.</span><span class="pl-en">invoke</span><span class="pl-kos">(</span><span class="pl-v">Method</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:372</span><span class="pl-kos">)</span>
   <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">internal</span><span class="pl-kos">.</span><span class="pl-en">os</span><span class="pl-kos">.</span><span class="pl-en">ZygoteInit</span>$MethodAndArgsCaller<span class="pl-kos">.</span><span class="pl-en">run</span><span class="pl-kos">(</span><span class="pl-v">ZygoteInit</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:909</span><span class="pl-kos">)</span>
   <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">internal</span><span class="pl-kos">.</span><span class="pl-en">os</span><span class="pl-kos">.</span><span class="pl-en">ZygoteInit</span><span class="pl-kos">.</span><span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-v">ZygoteInit</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:704</span><span class="pl-kos">)</span>
<span class="pl-en">Caused</span> <span class="pl-pds">by</span>: <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">view</span><span class="pl-kos">.</span><span class="pl-v">InflateException</span>: <span class="pl-v">Binary</span> <span class="pl-c1">XML</span> <span class="pl-en">file</span> <span class="pl-en">line</span> <span class="pl-c">#2: Error inflating class fragment</span>
   <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">view</span><span class="pl-kos">.</span><span class="pl-en">LayoutInflater</span><span class="pl-kos">.</span><span class="pl-en">createViewFromTag</span><span class="pl-kos">(</span><span class="pl-v">LayoutInflater</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:763</span><span class="pl-kos">)</span>
   <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">view</span><span class="pl-kos">.</span><span class="pl-en">LayoutInflater</span><span class="pl-kos">.</span><span class="pl-en">inflate</span><span class="pl-kos">(</span><span class="pl-v">LayoutInflater</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:482</span><span class="pl-kos">)</span>
   <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">view</span><span class="pl-kos">.</span><span class="pl-en">LayoutInflater</span><span class="pl-kos">.</span><span class="pl-en">inflate</span><span class="pl-kos">(</span><span class="pl-v">LayoutInflater</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:414</span><span class="pl-kos">)</span>
   <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">view</span><span class="pl-kos">.</span><span class="pl-en">LayoutInflater</span><span class="pl-kos">.</span><span class="pl-en">inflate</span><span class="pl-kos">(</span><span class="pl-v">LayoutInflater</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:365</span><span class="pl-kos">)</span>
   <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v7</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">AppCompatDelegateImplV7</span><span class="pl-kos">.</span><span class="pl-en">setContentView</span><span class="pl-kos">(</span><span class="pl-v">AppCompatDelegateImplV7</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:249</span><span class="pl-kos">)</span>
   <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v7</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">AppCompatActivity</span><span class="pl-kos">.</span><span class="pl-en">setContentView</span><span class="pl-kos">(</span><span class="pl-v">AppCompatActivity</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:106</span><span class="pl-kos">)</span>
   <span class="pl-en">at</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">oshare</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">core</span><span class="pl-kos">.</span><span class="pl-en">ChildActionBarActivity</span><span class="pl-kos">.</span><span class="pl-en">onCreate</span><span class="pl-kos">(</span><span class="pl-v">ChildActionBarActivity</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:13</span><span class="pl-kos">)</span>
   <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">Activity</span><span class="pl-kos">.</span><span class="pl-en">performCreate</span><span class="pl-kos">(</span><span class="pl-v">Activity</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:5977</span><span class="pl-kos">)</span>
   <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">Instrumentation</span><span class="pl-kos">.</span><span class="pl-en">callActivityOnCreate</span><span class="pl-kos">(</span><span class="pl-v">Instrumentation</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:1105</span><span class="pl-kos">)</span>
   <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">ActivityThread</span><span class="pl-kos">.</span><span class="pl-en">performLaunchActivity</span><span class="pl-kos">(</span><span class="pl-v">ActivityThread</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:2258</span><span class="pl-kos">)</span>
   ... <span class="pl-c1">10</span> <span class="pl-en">more</span>
<span class="pl-en">Caused</span> <span class="pl-pds">by</span>: <span class="pl-en">java</span><span class="pl-kos">.</span><span class="pl-en">lang</span><span class="pl-kos">.</span><span class="pl-en">IllegalStateException</span>: <span class="pl-v">Fragment</span> <span class="pl-en">com</span><span class="pl-kos">.</span><span class="pl-en">oshare</span><span class="pl-kos">.</span><span class="pl-en">fragment</span><span class="pl-kos">.</span><span class="pl-en">message</span><span class="pl-kos">.</span><span class="pl-en">SendMessageFragment</span> <span class="pl-en">did</span> not <span class="pl-en">create</span> <span class="pl-en">a</span> <span class="pl-en">view</span><span class="pl-kos">.</span>
   <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v4</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">FragmentManagerImpl</span><span class="pl-kos">.</span><span class="pl-en">onCreateView</span><span class="pl-kos">(</span><span class="pl-v">FragmentManager</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:2200</span><span class="pl-kos">)</span>
   <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v4</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">FragmentActivity</span><span class="pl-kos">.</span><span class="pl-en">onCreateView</span><span class="pl-kos">(</span><span class="pl-v">FragmentActivity</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:300</span><span class="pl-kos">)</span>
   <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v7</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">AppCompatDelegateImplV7</span><span class="pl-kos">.</span><span class="pl-en">callActivityOnCreateView</span><span class="pl-kos">(</span><span class="pl-v">AppCompatDelegateImplV7</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:838</span><span class="pl-kos">)</span>
   <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v7</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">AppCompatDelegateImplV11</span><span class="pl-kos">.</span><span class="pl-en">callActivityOnCreateView</span><span class="pl-kos">(</span><span class="pl-v">AppCompatDelegateImplV11</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:34</span><span class="pl-kos">)</span>
   <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v7</span><span class="pl-kos">.</span><span class="pl-en">app</span><span class="pl-kos">.</span><span class="pl-en">AppCompatDelegateImplV7</span><span class="pl-kos">.</span><span class="pl-en">onCreateView</span><span class="pl-kos">(</span><span class="pl-v">AppCompatDelegateImplV7</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:826</span><span class="pl-kos">)</span>
   <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">support</span><span class="pl-kos">.</span><span class="pl-en">v4</span><span class="pl-kos">.</span><span class="pl-en">view</span><span class="pl-kos">.</span><span class="pl-en">LayoutInflaterCompatHC</span>$FactoryWrapperHC<span class="pl-kos">.</span><span class="pl-en">onCreateView</span><span class="pl-kos">(</span><span class="pl-v">LayoutInflaterCompatHC</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:44</span><span class="pl-kos">)</span>
   <span class="pl-en">at</span> <span class="pl-en">android</span><span class="pl-kos">.</span><span class="pl-en">view</span><span class="pl-kos">.</span><span class="pl-en">LayoutInflater</span><span class="pl-kos">.</span><span class="pl-en">createViewFromTag</span><span class="pl-kos">(</span><span class="pl-v">LayoutInflater</span><span class="pl-kos">.</span><span class="pl-en">java</span><span class="pl-pds">:725</span><span class="pl-kos">)</span>
   ... <span class="pl-c1">19</span> <span class="pl-en">more</span></pre></div>