IndexOutOfBoundsException, but Error doesn't give me a line in code

I updated my application and suddenly got this error. I cannot make a head or tail because there is no line in my code.

People saw this on the phones that I saw on the same emulator, but it works fine on my home machine. remote database and start again and still nothing

Any ideas are welcome Thanks

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
source share
1 answer

I fixed it. I installed dafault, selected from the value stored in the database, but this did not match the number of values ​​that I had on the counter. Thanks for pointing me in the right direction.

+2
source

Source: https://habr.com/ru/post/1414252/


All Articles