10-22 01:15:38.271: ERROR/ArrayAdapter(316): You must supply a resource ID for a TextView 10-22 01:15:38.312: ERROR/AndroidRuntime(316): FATAL EXCEPTION: main 10-22 01:15:38.312: ERROR/AndroidRuntime(316): java.lang.IllegalStateException: ArrayAdapter requires the resource ID to be a TextView 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java: 347) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at android.widget.ArrayAdapter.getView(ArrayAdapter.java:323) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at android.widget.AbsListView.obtainView(AbsListView.java:1315) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at android.widget.ListView.makeAndAddView(ListView.java:1727) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at android.widget.ListView.fillDown(ListView.java:652) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at android.widget.ListView.fillFromTop(ListView.java:709) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at android.widget.ListView.layoutChildren(ListView.java:1580) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at android.widget.AbsListView.onLayout(AbsListView.java:1147) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at android.view.View.layout(View.java:7035) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at android.widget.FrameLayout.onLayout(FrameLayout.java:333) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at android.view.View.layout(View.java:7035) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1249) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1125) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at android.widget.LinearLayout.onLayout(LinearLayout.java:1042) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at android.view.View.layout(View.java:7035) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at android.widget.FrameLayout.onLayout(FrameLayout.java:333) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at android.view.View.layout(View.java:7035) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at android.view.ViewRoot.performTraversals(ViewRoot.java:1045) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at android.view.ViewRoot.handleMessage(ViewRoot.java:1727) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at android.os.Handler.dispatchMessage(Handler.java:99) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at android.os.Looper.loop(Looper.java:123) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at android.app.ActivityThread.main(ActivityThread.java:4627) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at java.lang.reflect.Method.invokeNative(Native Method) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at java.lang.reflect.Method.invoke(Method.java:521) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:868) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at dalvik.system.NativeStart.main(Native Method) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): Caused by: java.lang.ClassCastException: android.widget.RelativeLayout 10-22 01:15:38.312: ERROR/AndroidRuntime(316): at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java: 340) 10-22 01:15:38.312: ERROR/AndroidRuntime(316): ... 26 more
On Oct 21, 12:50 pm, TreKing <treking...@gmail.com> wrote: > On Thu, Oct 21, 2010 at 2:43 PM, Gabriel Huie <ghui...@gmail.com> wrote: > > So i ran the debugger on eclipse so im not sure if this was what u meant > > Yup. > > That's the stack of the main thread. You want the exception message from the > LogCat window. It will be basically the same, but ideally the logcat will > have a message indicating *why* the exception was thrown. > > Look for the LogCat View in Eclipse. If you don't have it, go to > Window->Show View->Other->Android to enable it. > > Regardless, you can see it's crashing while trying to layout your view and > you know it started happening after you made the layout changes, so > something's wrong with your layout file. Post that. > > --------------------------------------------------------------------------- > ---------------------- > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago > transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en