English 中文(简体)
索引外出( 例外), 但错误没有在代码中给我一条线
原标题:IndexOutOfBoundsException but Error does not give me a Line in the Code
  • 时间:2012-05-24 20:52:49
  •  标签:
  • android

我更新了我的应用程序, 突然收到这个错误。 我无法在代码中没有线条的情况下将它做成头部或尾部 。 @ info: whatsthis

人们在电话上看到这个, 我用一个模拟器看到过这个, 但在我家里的机器上,它工作很好。删除了数据库,重新开始,还是一无所有。

Any ideas would be 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)
最佳回答

我已经修好了。 我正在从数据库中保存的值中设置一个从数据库中选择的默认值, 但这与我在旋转器中的数值数量不符。 感谢您指示我正确方向

问题回答

暂无回答




相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签