蔭試圖執行一個複選框接觸和選擇多個聯繫人和保存them..below是我的代碼安卓:複選框選擇多個ArrayIndexOutOfBoundsException異常
但IAM越來越ArrayIndexOutOfBoundsException異常在行
viewHolder.checkBox.setChecked(checkBoxState[position]);
01-02 20:14:51.926: E/AndroidRuntime(26353): java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
01-02 20:14:51.926: E/AndroidRuntime(26353): at org.app.myhood.adaptor.ProfileAdapter.getView(ProfileAdapter.java:215)
01-02 20:14:51.926: E/AndroidRuntime(26353): at android.widget.AbsListView.obtainView(AbsListView.java:2468)
01-02 20:14:51.926: E/AndroidRuntime(26353): at android.widget.ListView.measureHeightOfChildren(ListView.java:1250)
01-02 20:14:51.926: E/AndroidRuntime(26353): at android.widget.ListView.onMeasure(ListView.java:1162)
01-02 20:14:51.926: E/AndroidRuntime(26353): at android.view.View.measure(View.java:15481)
01-02 20:14:51.926: E/AndroidRuntime(26353): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5107)
01-02 20:14:51.926: E/AndroidRuntime(26353): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1396)
01-02 20:14:51.926: E/AndroidRuntime(26353): at android.widget.LinearLayout.measureHorizontal(LinearLayout.java:1038)
我感到震驚,任何幫助表示讚賞。
崩潰時'position'和'checkBoxState'的大小是什麼? – slybloty