【问题标题】:Android - 'JDI thread evaluations' has encountered a problemAndroid - “JDI 线程评估”遇到问题
【发布时间】:2011-08-07 01:33:27
【问题描述】:

这段代码有错误:

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>

有谁知道可能是什么问题?

感谢您的帮助

【问题讨论】:

    标签: java android


    【解决方案1】:

    当此错误发生时,您可以使用表达式视图(如果您是 Eclipse IDE 或任何其他 Watch)来获取此/任何变量的状态。对于某些我不知道的原因,Eclipse 有时会在尝试使用光标显示变量时显示此错误...

    【讨论】:

    • 好吧,事实证明我的问题与错误无关,我修复了它。我想 Eclipse 在向我显示基于 xml 文件的变量内容时遇到了麻烦。无论如何,谢谢你的提示。
    猜你喜欢
    • 2011-01-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-07-12
    • 2013-07-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多