Unable to debug a ResourceNotFoundException
<p>I'm having a little trouble trying to debug a <code>Resources$NotFoundException</code>. I'm trying to add items from an enum to a <code>AlertDialog</code> dynamically:</p>

<p>Here's the code from my <code>Activity</code>:</p>

<pre><code>final ArrayList&lt;CharSequence&gt; lstChoices = new ArrayList&lt;CharSequence&gt;();

for (TrendingManager.Filter fltFilter : TrendingManager.Filter.values()) {

    lstChoices
    .add(getResources()
            .getString(
                    getApplicationContext()
                            .getResources()
                            .getIdentifier(
                                    fltFilter.name().toLowerCase(),
                                    "string",
                                    getApplicationContext()
                                            .getApplicationInfo().packageName)));

}
</code></pre>

<p>Here's the list of enums:</p>

<pre><code>public class TrendingManager {

    public static enum Filter {
            ONLY_PRIVATE, ONLY_PUBLIC, ONLY_HQ, ONLY_LQ
    };

}
</code></pre>

<p>I have all those 4 enums defined in my <code>strings.xml</code> and it works on my phone but I get crash reports from a user's phone which says:</p>

<pre><code>android.content.res.Resources$NotFoundException: String resource ID #0x0
at android.content.res.Resources.getText(Resources.java:260)
at android.content.res.Resources.getString(Resources.java:344)
at com.mridang.myapp.Trend.onOptionsItemSelected(Trend.java:230)
at android.app.Activity.onMenuItemSelected(Activity.java:2564)
...
...
...
</code></pre>

<p>I'm really lost with as to why this happens. Any ideas as to why the resource isn't found?</p>
