Resources.NotFoundException thrown on res/color/secondary_text_dark.xml
<p>I've received a crash report with an error caused by a Resource.NotFoundException. What is strange, however, is that it is thrown by the Android compatibility library in a DialogFragment when it is trying to use the res/color/secondary_text_dark.xml colour (during its creation). This is an Android resource (found in android.R.color.secondary_text_dark), so I assume that every device should have this available. </p>

<p>I have an idea that the exception is caused because Proguard has obfuscated the resources, but I'm not sure how to avoid this.
I am not able to reproduce the crash on my Nexus One, so I will not be able to check if a change fixes this.</p>

<p>Am I right about the obfuscator or are there any other things which could cause this?</p>

<p>Thank you very much.</p>

<p>I've attached the log here:</p>

<pre><code>android.view.InflateException: Binary XML file line #8: Error inflating class &lt;unknown&gt;
at android.view.LayoutInflater.createView(LayoutInflater.java:513)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at org.kaloersoftware.kaloerclock.MathDialogFragment.android.view.View onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.void moveToState(android.support.v4.app.Fragment,int,int,int)(Unknown Source)
                                              void moveToState(android.support.v4.app.Fragment)
                                              void moveToState(int,boolean)
                                              void moveToState(int,int,int,boolean)
at android.support.v4.app.FragmentManagerImpl.void moveToState(android.support.v4.app.Fragment,int,int,int)(Unknown Source)
                                              void moveToState(android.support.v4.app.Fragment)
                                              void moveToState(int,boolean)
                                              void moveToState(int,int,int,boolean)
at android.support.v4.app.BackStackRecord.void run()(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.boolean execPendingActions()(Unknown Source)
at android.support.v4.app.FragmentManagerImpl$1.void run()(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4669)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:876)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at android.widget.TextView.&lt;init&gt;(TextView.java:329)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
at android.view.LayoutInflater.createView(LayoutInflater.java:500)
... 20 more
Caused by: android.content.res.Resources$NotFoundException: File res/color/secondary_text_dark.xml from color state list resource ID #0x0
at android.content.res.Resources.loadColorStateList(Resources.java:1817)
at android.content.res.TypedArray.getColorStateList(TypedArray.java:342)
at android.widget.TextView.&lt;init&gt;(TextView.java:394)
... 24 more
Caused by: android.content.res.Resources$NotFoundException: File res/color/secondary_text_dark.xml from xml type colorstatelist resource ID #0x0
at android.content.res.Resources.loadXmlResourceParser(Resources.java:1924)
at android.content.res.Resources.loadColorStateList(Resources.java:1812)
... 26 more
</code></pre>

<p>And this is the layout.xml:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:padding="8dip"
    android:background="#33332D"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"&gt;
    &lt;TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:textSize="50sp"
        android:gravity="center"
        android:paddingBottom="10dip"
        android:textColor="@color/ltgrey"
        android:id="@+id/math_question_question"
        /&gt;
    &lt;TableLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:weightSum="2"&gt;
        &lt;TableRow&gt;
            &lt;Button
                android:textSize="30sp"
                android:id="@+id/math_question_ans1"
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:layout_weight="1"/&gt;
            &lt;Button 
                android:textSize="30sp"
                android:id="@+id/math_question_ans2"
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:layout_weight="1"/&gt;
        &lt;/TableRow&gt;
        &lt;TableRow&gt;
            &lt;Button
                android:textSize="30sp"
                android:id="@+id/math_question_ans3"
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:layout_weight="1"/&gt;
            &lt;Button
                android:textSize="30sp"
                android:id="@+id/math_question_ans4"
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:layout_weight="1"/&gt;
        &lt;/TableRow&gt;
    &lt;/TableLayout&gt;
    &lt;Button
        android:textSize="30sp"
        android:id="@+id/math_question_cancel"
        android:text="@string/math_question_cancel"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"/&gt;
&lt;/LinearLayout&gt;
</code></pre>

<p>The textColor in the first TextView refers to this in my colors.xml file</p>

<pre><code>&lt;color name="ltgrey"&gt;#ffe0e0e0&lt;/color&gt;
</code></pre>
