我在使用此代码时遇到错误:
xmldata = mContext.getResources().getStringArray(R.array.map1);
for(int y = 0; y < 15; y++){
st = new StringTokenizer(xmldata[y], ", "); // error here <<<
// some other stuff
}
当我在xmldata
上使用调试器时,我在Eclipse上遇到了这个错误:
'JDI thread evaluations' has encountered a problem.
Exception processing async thread queue.
详细说明:
Exception processing async thread queue
Exception processing async thread queue
java.lang.UnsupportedOperationException
xml文件本身:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="map1X">13</integer>
<integer name="map1Y">7</integer>
<string-array name="map1">
<item>0,0,0,0,0,0,0,0,0,0,0,0,0</item>
<item>0,0,0,0,0,0,0,0,0,0,0,0,0</item>
<item>0,0,0,0,0,0,0,0,0,0,2,2,2</item>
<item>0,0,0,0,0,0,0,0,2,2,2,2,2</item>
<item>0,0,0,0,0,0,2,2,2,2,2,2,2</item>
<item>0,0,0,0,0,0,0,0,0,0,0,0,0</item>
<item>1,1,1,1,1,1,1,1,1,1,1,1,1</item>
</string-array>
</resources>
有谁知道问题可能是什么?
感谢您的帮助
答案 0 :(得分:2)
当发生此错误时,您可以使用表达式视图(如果您使用Eclipse IDE或任何其他Watch)来获取此/任何变量的状态。对于某些人,我不知道原因,Eclipse在尝试使用光标显示变量时有时会显示此错误...