0

我在 Android Market 上的应用程序上发生了一个奇怪的错误。一位用户对我说,当他尝试打开我的应用程序时,它崩溃了。看看这个错误:

有人知道这个错误吗?

java.lang.IndexOutOfBoundsException
at java.util.Arrays$ArrayList.get(Arrays.java:77)
at android.widget.ArrayAdapter.getItem(ArrayAdapter.java:298)
at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:351)
at android.widget.ArrayAdapter.getView(ArrayAdapter.java:323)
at android.widget.Spinner.makeAndAddView(Spinner.java:189)
at android.widget.Spinner.layout(Spinner.java:148)
at android.widget.Spinner.onLayout(Spinner.java:112)
at android.view.View.layout(View.java:7198)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1249)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1125)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1042)
at android.view.View.layout(View.java:7198)
at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
at android.widget.ScrollView.onLayout(ScrollView.java:1578)
at android.view.View.layout(View.java:7198)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:909)
at android.view.View.layout(View.java:7198)
at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
at android.view.View.layout(View.java:7198)
at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
at android.view.View.layout(View.java:7198)
at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
at android.view.View.layout(View.java:7198)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1249)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1125)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1042)
at android.view.View.layout(View.java:7198)
at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
at android.view.View.layout(View.java:7198)
at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
at android.view.View.layout(View.java:7198)
at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
at android.view.View.layout(View.java:7198)
at android.view.ViewRoot.performTraversals(ViewRoot.java:1045)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1727)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:876)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634)
at dalvik.system.NativeStart.main(Native Method)
4

2 回答 2

0

您正在尝试从其值中访问 arraylist 值。这就是这个错误的原因。发布您的编码,以便我们可以准确找到问题所在。最佳做法是使用 for 循环。尝试使用它,并希望您的问题能由此解决。否则发布代码

于 2013-08-20T09:00:41.323 回答
0

检查微调器中的 setSelection 值

于 2013-09-27T06:01:46.173 回答