Thanks for the quick reply. Switching to lower case did not fix the issue. Logcat does not show an exception... Am I suppose to enable the logging of exceptions?
The debugger window shows: Thread[<3> main] (Suspended (exception RuntimeException)) ZygoteInit$MethodAndArgsCaller.run() line: 788 ZygoteInit.main(String[]) line: 540 NativeStart.main(String[]) line: not available [native method] On Thu, Jul 2, 2009 at 7:08 PM, Mark Murphy<[email protected]> wrote: > > jstoezel wrote: >> Hi, >> >> I'm getting a runtime exception when calling the last line of the >> following code: >> >> Spinner s = (Spinner) findViewById(R.id.samplingTimeSpinner); >> ArrayAdapter adapter = ArrayAdapter.createFromResource(this, >> R.array.samplingRate, android.R.layout.simple_spinner_item); >> adapter.setDropDownViewResource >> (android.R.layout.simple_spinner_dropdown_item); >> s.setAdapter(adapter); >> >> I have no idea why this is happening. Any idea what causes this? > > What is the exception? You can get the Java stack trace from adb logcat, > DDMS, or the DDMS perspective in Eclipse. > > If you get a NullPointerException, try using R.id.samplingtimespinner > (note all lowercase). > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com | http://twitter.com/commonsguy > > _Android Programming Tutorials_ Version 1.0 Available! > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

