2013-02-24 19 views
0

我在我的android应用程序中使用unicode字符。当我想他们是外部资源,我创建的字符串数组中的strings.xml如下如何把字符串数组中的Unicode字符作为外部资源

<string-array name="geez_first_chars"> 
    <item >"\u1200"</item> 
    <item >"\u1208"</item> 
    <item >"\u1210"</item> 
    <item >"\u1218"</item> 
    .... 
</string-array> 

我访问了它们,然后在我的Java代码如下:

String fidels[] = getResources().getStringArray(R.array.geez_first_chars); 

但是,有运行错误,请帮我解决这个问题。

+2

发布错误的logcat输出。 – 2013-02-24 10:49:38

回答

0

我自己想出了上述问题。运行时错误是由调用getResources()造成的...... 将“String fidels []”放在后面我将调用移至onCreate(),它运行良好。

干杯!

相关问题