4

アプリを更新したところ、突然このエラーが発生しました。コードに行がないため、頭も尻尾もできません。

あるエミュレーターで見た携帯電話でこれを見た人がいますが、自宅のマシンでは問題なく動作します。データベースを削除して再起動しても何もない

どんなアイデアでも大歓迎ですありがとう

java.lang.IndexOutOfBoundsException: Invalid index 1, size is 1
at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:251)
at java.util.ArrayList.get(ArrayList.java:304)
at android.widget.ArrayAdapter.getItem(ArrayAdapter.java:337)
at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:390)
at android.widget.ArrayAdapter.getView(ArrayAdapter.java:362)
at android.widget.Spinner.makeAndAddView(Spinner.java:398)
at android.widget.Spinner.layout(Spinner.java:349)
at android.widget.Spinner.onLayout(Spinner.java:313)
at android.view.View.layout(View.java:11359)
at android.view.ViewGroup.layout(ViewGroup.java:4531)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1628)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1486)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1399)
at android.view.View.layout(View.java:11359)
at android.view.ViewGroup.layout(ViewGroup.java:4531)
at android.widget.FrameLayout.onLayout(FrameLayout.java:431)
at android.view.View.layout(View.java:11359)
at android.view.ViewGroup.layout(ViewGroup.java:4531)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1628)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1486)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1399)
at android.view.View.layout(View.java:11359)
at android.view.ViewGroup.layout(ViewGroup.java:4531)
at android.widget.FrameLayout.onLayout(FrameLayout.java:431)
at android.view.View.layout(View.java:11359)
at android.view.ViewGroup.layout(ViewGroup.java:4531)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1628)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1486)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1399)
at android.view.View.layout(View.java:11359)
at android.view.ViewGroup.layout(ViewGroup.java:4531)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:925)
at android.view.View.layout(View.java:11359)
at android.view.ViewGroup.layout(ViewGroup.java:4531)
at android.widget.FrameLayout.onLayout(FrameLayout.java:431)
at android.view.View.layout(View.java:11359)
at android.view.ViewGroup.layout(ViewGroup.java:4531)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1628)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1486)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1399)
at android.view.View.layout(View.java:11359)
at android.view.ViewGroup.layout(ViewGroup.java:4531)
at android.widget.FrameLayout.onLayout(FrameLayout.java:431)
at android.view.View.layout(View.java:11359)
at android.view.ViewGroup.layout(ViewGroup.java:4531)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1665)
at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2695)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:4974)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
4

1 に答える 1

2

私はそれを修正しました。データベースに保存された値から選択されたデフォルトを設定していましたが、これはスピナーにある値の量と一致しませんでした。正しい方向に向けてくれてありがとう

于 2013-01-09T13:09:43.727 に答える