Android inflater exception FileNotFound
<p>After I installed ACRA I started to get all kinds of crash reports. Most makes sense and I fix them as I go. But this one doesn't make much sense to me.</p>

<ol>
<li>This is version running on hundreds of devices - this error happened on this device multiple times within time period and now seems to be fine.</li>
<li>I can't reproduce it.</li>
<li>res/drawable-mdpi/tire.png indeed exists.</li>
<li>This is "glitch" type of exception, but I wonder if there any way to handle this one and maybe someone else see this stack trace different.</li>
</ol>

<p>EDIT:</p>

<p>I have 2 constructors (not sure how to debug those)</p>

<pre><code>public TireView(Context context)
    {
        super(context);
        this.mContext = context;

        inflateLayout();
    }

    public TireView(Context context, AttributeSet attrs)
    {
        super(context, attrs);
        this.mContext = context;

        inflateLayout();

        final TypedArray a = getContext().obtainStyledAttributes(attrs,R.styleable.TireView);

        int i = a.getInteger(R.styleable.TireView_Number, -1);
        if (i != -1)
        {
            setNumber(i);
        }

        i = a.getInteger(R.styleable.TireView_Depth, -1);
        if (i != -1)
        {
            setDepth(i);
        }

        i = a.getInteger(R.styleable.TireView_Pressure, -1);
        if (i != -1)
        {
            setPressure(i);
        }

    }
</code></pre>

<blockquote>
  <p>java.lang.RuntimeException: Unable to start activity
  ComponentInfo{com.idatt/com.idatt.activities.TrailerInspectionActivity}:
  android.view.InflateException: Binary XML file line #86: Error
  inflating class com.idatt.views.TireView        at
  android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
  at
  android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
  at android.app.ActivityThread.access$1500(ActivityThread.java:117)<br>
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
  at android.os.Handler.dispatchMessage(Handler.java:99)        at
  android.os.Looper.loop(Looper.java:130)        at
  android.app.ActivityThread.main(ActivityThread.java:3687)        at
  java.lang.reflect.Method.invokeNative(Native Method)        at
  java.lang.reflect.Method.invoke(Method.java:507)        at
  com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)<br>
  at dalvik.system.NativeStart.main(Native Method)Caused by:
  android.view.InflateException: Binary XML file line #86: Error
  inflating class com.idatt.views.TireView        at
  android.view.LayoutInflater.createView(LayoutInflater.java:518)<br>
  at
  android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)<br>
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)<br>
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)<br>
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)<br>
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)<br>
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)<br>
  at android.view.LayoutInflater.inflate(LayoutInflater.java:408)<br>
  at android.view.LayoutInflater.inflate(LayoutInflater.java:320)<br>
  at android.view.LayoutInflater.inflate(LayoutInflater.java:276)<br>
  at
  com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:226)
  at android.app.Activity.setContentView(Activity.java:1657)        at
  com.idatt.activities.TrailerInspectionActivity.onCreate(SourceFile:279)
  at
  android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
  at
  android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
  ... 11 moreCaused by: java.lang.reflect.InvocationTargetException<br>
  at java.lang.reflect.Constructor.constructNative(Native Method)<br>
  at java.lang.reflect.Constructor.newInstance(Constructor.java:415)<br>
  at android.view.LayoutInflater.createView(LayoutInflater.java:505)<br>
  ... 26 moreCaused by: android.content.res.Resources$NotFoundException:
  File res/drawable-mdpi/tire.png from drawable resource ID #0x7f02002a 
  at android.content.res.Resources.loadDrawable(Resources.java:1714)<br>
  at android.content.res.Resources.getDrawable(Resources.java:581)<br>
  at android.view.View.setBackgroundResource(View.java:7533)        at
  com.idatt.views.TireView.a(SourceFile:65)        at
  com.idatt.views.TireView.(SourceFile:38)        ... 29
  moreCaused by: java.io.FileNotFoundException:
  res/drawable-mdpi/tire.png        at
  android.content.res.AssetManager.openNonAssetNative(Native Method)<br>
  at
  android.content.res.AssetManager.openNonAsset(AssetManager.java:406)<br>
  at android.content.res.Resources.loadDrawable(Resources.java:1706)<br>
  ... 33 moreandroid.view.InflateException: Binary XML file line #86:
  Error inflating class com.idatt.views.TireView        at
  android.view.LayoutInflater.createView(LayoutInflater.java:518)<br>
  at
  android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)<br>
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)<br>
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)<br>
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)<br>
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)<br>
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)<br>
  at android.view.LayoutInflater.inflate(LayoutInflater.java:408)<br>
  at android.view.LayoutInflater.inflate(LayoutInflater.java:320)<br>
  at android.view.LayoutInflater.inflate(LayoutInflater.java:276)<br>
  at
  com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:226)
  at android.app.Activity.setContentView(Activity.java:1657)        at
  com.idatt.activities.TrailerInspectionActivity.onCreate(SourceFile:279)
  at
  android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
  at
  android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
  at
  android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
  at android.app.ActivityThread.access$1500(ActivityThread.java:117)<br>
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
  at android.os.Handler.dispatchMessage(Handler.java:99)        at
  android.os.Looper.loop(Looper.java:130)        at
  android.app.ActivityThread.main(ActivityThread.java:3687)        at
  java.lang.reflect.Method.invokeNative(Native Method)        at
  java.lang.reflect.Method.invoke(Method.java:507)        at
  com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)<br>
  at dalvik.system.NativeStart.main(Native Method)Caused by:
  java.lang.reflect.InvocationTargetException        at
  java.lang.reflect.Constructor.constructNative(Native Method)        at
  java.lang.reflect.Constructor.newInstance(Constructor.java:415)<br>
  at android.view.LayoutInflater.createView(LayoutInflater.java:505)<br>
  ... 26 moreCaused by: android.content.res.Resources$NotFoundException:
  File res/drawable-mdpi/tire.png from drawable resource ID #0x7f02002a 
  at android.content.res.Resources.loadDrawable(Resources.java:1714)<br>
  at android.content.res.Resources.getDrawable(Resources.java:581)<br>
  at android.view.View.setBackgroundResource(View.java:7533)        at
  com.idatt.views.TireView.a(SourceFile:65)        at
  com.idatt.views.TireView.(SourceFile:38)        ... 29
  moreCaused by: java.io.FileNotFoundException:
  res/drawable-mdpi/tire.png        at
  android.content.res.AssetManager.openNonAssetNative(Native Method)<br>
  at
  android.content.res.AssetManager.openNonAsset(AssetManager.java:406)<br>
  at android.content.res.Resources.loadDrawable(Resources.java:1706)<br>
  ... 33 morejava.lang.reflect.InvocationTargetException        at
  java.lang.reflect.Constructor.constructNative(Native Method)        at
  java.lang.reflect.Constructor.newInstance(Constructor.java:415)<br>
  at android.view.LayoutInflater.createView(LayoutInflater.java:505)<br>
  at
  android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)<br>
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)<br>
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)<br>
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)<br>
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)<br>
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)<br>
  at android.view.LayoutInflater.inflate(LayoutInflater.java:408)<br>
  at android.view.LayoutInflater.inflate(LayoutInflater.java:320)<br>
  at android.view.LayoutInflater.inflate(LayoutInflater.java:276)<br>
  at
  com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:226)
  at android.app.Activity.setContentView(Activity.java:1657)        at
  com.idatt.activities.TrailerInspectionActivity.onCreate(SourceFile:279)
  at
  android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
  at
  android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
  at
  android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
  at android.app.ActivityThread.access$1500(ActivityThread.java:117)<br>
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
  at android.os.Handler.dispatchMessage(Handler.java:99)        at
  android.os.Looper.loop(Looper.java:130)        at
  android.app.ActivityThread.main(ActivityThread.java:3687)        at
  java.lang.reflect.Method.invokeNative(Native Method)        at
  java.lang.reflect.Method.invoke(Method.java:507)        at
  com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)<br>
  at dalvik.system.NativeStart.main(Native Method)Caused by:
  android.content.res.Resources$NotFoundException: File
  res/drawable-mdpi/tire.png from drawable resource ID #0x7f02002a<br>
  at android.content.res.Resources.loadDrawable(Resources.java:1714)<br>
  at android.content.res.Resources.getDrawable(Resources.java:581)<br>
  at android.view.View.setBackgroundResource(View.java:7533)        at
  com.idatt.views.TireView.a(SourceFile:65)        at
  com.idatt.views.TireView.(SourceFile:38)        ... 29
  moreCaused by: java.io.FileNotFoundException:
  res/drawable-mdpi/tire.png        at
  android.content.res.AssetManager.openNonAssetNative(Native Method)<br>
  at
  android.content.res.AssetManager.openNonAsset(AssetManager.java:406)<br>
  at android.content.res.Resources.loadDrawable(Resources.java:1706)<br>
  ... 33 moreandroid.content.res.Resources$NotFoundException: File
  res/drawable-mdpi/tire.png from drawable resource ID #0x7f02002a<br>
  at android.content.res.Resources.loadDrawable(Resources.java:1714)<br>
  at android.content.res.Resources.getDrawable(Resources.java:581)<br>
  at android.view.View.setBackgroundResource(View.java:7533)        at
  com.idatt.views.TireView.a(SourceFile:65)        at
  com.idatt.views.TireView.(SourceFile:38)        at
  java.lang.reflect.Constructor.constructNative(Native Method)        at
  java.lang.reflect.Constructor.newInstance(Constructor.java:415)<br>
  at android.view.LayoutInflater.createView(LayoutInflater.java:505)<br>
  at
  android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)<br>
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)<br>
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)<br>
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)<br>
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)<br>
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)<br>
  at android.view.LayoutInflater.inflate(LayoutInflater.java:408)<br>
  at android.view.LayoutInflater.inflate(LayoutInflater.java:320)<br>
  at android.view.LayoutInflater.inflate(LayoutInflater.java:276)<br>
  at
  com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:226)
  at android.app.Activity.setContentView(Activity.java:1657)        at
  com.idatt.activities.TrailerInspectionActivity.onCreate(SourceFile:279)
  at
  android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
  at
  android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
  at
  android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
  at android.app.ActivityThread.access$1500(ActivityThread.java:117)<br>
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
  at android.os.Handler.dispatchMessage(Handler.java:99)        at
  android.os.Looper.loop(Looper.java:130)        at
  android.app.ActivityThread.main(ActivityThread.java:3687)        at
  java.lang.reflect.Method.invokeNative(Native Method)        at
  java.lang.reflect.Method.invoke(Method.java:507)        at
  com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)<br>
  at dalvik.system.NativeStart.main(Native Method)Caused by:
  java.io.FileNotFoundException: res/drawable-mdpi/tire.png        at
  android.content.res.AssetManager.openNonAssetNative(Native Method)<br>
  at
  android.content.res.AssetManager.openNonAsset(AssetManager.java:406)<br>
  at android.content.res.Resources.loadDrawable(Resources.java:1706)<br>
  ... 33 morejava.io.FileNotFoundException: res/drawable-mdpi/tire.png<br>
  at android.content.res.AssetManager.openNonAssetNative(Native Method) 
  at
  android.content.res.AssetManager.openNonAsset(AssetManager.java:406)<br>
  at android.content.res.Resources.loadDrawable(Resources.java:1706)<br>
  at android.content.res.Resources.getDrawable(Resources.java:581)<br>
  at android.view.View.setBackgroundResource(View.java:7533)        at
  com.idatt.views.TireView.a(SourceFile:65)        at
  com.idatt.views.TireView.(SourceFile:38)        at
  java.lang.reflect.Constructor.constructNative(Native Method)        at
  java.lang.reflect.Constructor.newInstance(Constructor.java:415)<br>
  at android.view.LayoutInflater.createView(LayoutInflater.java:505)<br>
  at
  android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)<br>
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)<br>
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)<br>
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)<br>
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)<br>
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)<br>
  at android.view.LayoutInflater.inflate(LayoutInflater.java:408)<br>
  at android.view.LayoutInflater.inflate(LayoutInflater.java:320)<br>
  at android.view.LayoutInflater.inflate(LayoutInflater.java:276)<br>
  at
  com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:226)
  at android.app.Activity.setContentView(Activity.java:1657)        at
  com.idatt.activities.TrailerInspectionActivity.onCreate(SourceFile:279)
  at
  android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
  at
  android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
  at
  android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
  at android.app.ActivityThread.access$1500(ActivityThread.java:117)<br>
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
  at android.os.Handler.dispatchMessage(Handler.java:99)        at
  android.os.Looper.loop(Looper.java:130)        at
  android.app.ActivityThread.main(ActivityThread.java:3687)        at
  java.lang.reflect.Method.invokeNative(Native Method)        at
  java.lang.reflect.Method.invoke(Method.java:507)        at
  com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)<br>
  at dalvik.system.NativeStart.main(Native Method)</p>
</blockquote>
