I was working on loading a combobox or in android terms a spinner. I was following this tutorial and I can't seem to get it working with my current app.
http://developer.android.com/guide/tutorials/views/hello-spinner.html
I first created an app that just loaded a spinner. It ran completely fine but when I tried adding it to my current code it crashes everytime. I have the combo box in a second "activity" or "page" so when the user clicks next page the user gets directed to the next page but the force close comes up before anything happens.
When I commented out the line s.setAdapter(adapter) and the program works without crashing(but obviously the spinner is not loaded). I was hoping my logcat would reveal some information on this but it doesnt seem to display anything.
The only difference I can see in my code is that it is file being called.
Any suggestions are greatly appreciated.
Thanks!
Edit:
Here is the LogCat
02-06 19:39:08.289: ERROR/SensorManager(2260): registerListener 4:gp2a Light Sensor delay:240
02-06 19:39:08.294: ERROR/SensorManager(2260): =======>>>Sensor Thread RUNNING <<<========
02-06 19:39:08.294: ERROR/SensorManager(2260): registerListener: com.android.server.PowerManagerService$9@477ecd90
02-06 19:39:08.504: ERROR/SensorManager(2260): registerListener 0:SMB380 delay:240
02-06 19:39:08.534: ERROR/SensorManager(2260): registerListener: android.view.WindowOrientationListener$SensorEventListenerImpl@47960660
02-06 19:39:08.544: ERROR/PowerManagerService(2260): setTargetLocked targetValue=116 target=116 nominalCurrentValue=11 ani=true
02-06 19:39:12.859: ERROR/AndroidRuntime(11972): Uncaught handler: thread main exiting due to uncaught exception
02-06 19:39:12.869: ERROR/AndroidRuntime(11972): java.lang.RuntimeException: Unable to start activity ComponentInfo{Jason.notify/Jason.notify.Screen2}: java.lang.NullPointerException
02-06 19:39:12.869: ERROR/AndroidRuntime(11972): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
02-06 19:39:12.869: ERROR/AndroidRuntime(11972): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
02-06 19:39:12.869: ERROR/AndroidRuntime(11972): at android.app.ActivityThread.access$2200(ActivityThread.java:119)
02-06 19:39:12.869: ERROR/AndroidRuntime(11972): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
02-06 19:39:12.869: ERROR/AndroidRuntime(11972): at android.os.Handler.dispatchMessage(Handler.java:99)
02-06 19:39:12.869: ERROR/AndroidRuntime(11972): at android.os.Looper.loop(Looper.java:123)
02-06 19:39:12.869: ERROR/AndroidRuntime(11972): at android.app.ActivityThread.main(ActivityThread.java:4363)
02-06 19:39:12.869: ERROR/AndroidRuntime(11972): at java.lang.reflect.Method.invokeNative(Native Method)
02-06 19:39:12.869: ERROR/AndroidRuntime(11972): at java.lang.reflect.Method.invoke(Method.java:521)
02-06 19:39:12.869: ERROR/AndroidRuntime(11972): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:862)
02-06 19:39:12.869: ERROR/AndroidRuntime(11972): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
02-06 19:39:12.869: ERROR/AndroidRuntime(11972): at dalvik.system.NativeStart.main(Native Method)
02-06 19:39:12.869: ERROR/AndroidRuntime(11972): Caused by: java.lang.NullPointerException
02-06 19:39:12.869: ERROR/AndroidRuntime(11972): at Jason.notify.Screen2.onCreate(Screen2.java:37)
02-06 19:39:12.869: ERROR/AndroidRuntime(11972): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
02-06 19:39:12.869: ERROR/AndroidRuntime(11972): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
02-06 19:39:12.869: ERROR/AndroidRuntime(11972): ... 11 more
02-06 19:39:39.359: ERROR/InfoAlarmWidget(2332): AllDay Event Count = 0
02-06 19:39:40.884: ERROR/SensorManager(2260): unregisterListener: com.android.server.PowerManagerService$9@477ecd90
02-06 19:39:41.359: ERROR/SensorManager(2260): unregisterListener: android.view.WindowOrientationListener$SensorEventListenerImpl@47960660
02-06 19:54:44.729: ERROR/NetworkStateTracker(2260): net.tcp.buffersize.hsdpa not found in system properties. Using defaults