why is that my context.getResources().getStringArray() still got error
<p>Good day, i am figuring out what's wrong with my code. I hope you guys can help me.
This is my code:</p>

<pre><code>String[] commandWords =
            context.getResources().getStringArray(R.array.on_command);
</code></pre>

<p>This is my strings.xml file:</p>

<pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
    &lt;resources&gt;
&lt;string name="OnAppliance1"&gt;first appliance&lt;/string&gt;
&lt;string name="OnAppliance2"&gt;second appliance&lt;/string&gt;
&lt;string name="OnAppliance3"&gt;third appliance&lt;/string&gt;
&lt;string name="OnAppliance4"&gt;fourth appliance&lt;/string&gt;
&lt;string name="OnAppliance5"&gt;fifth appliance&lt;/string&gt;
&lt;string-array name="on_command"&gt;
    &lt;item&gt;@string/OnAppliance1&lt;/item&gt;
    &lt;item&gt;@string/OnAppliance2&lt;/item&gt;
    &lt;item&gt;@string/OnAppliance3&lt;/item&gt;
    &lt;item&gt;@string/OnAppliance4&lt;/item&gt;
    &lt;item&gt;@string/OnAppliance5&lt;/item&gt;
&lt;/string-array&gt;

   &lt;/resources&gt;
</code></pre>
