Thank you Dallas for your response! And thanks to all others who
helped. I'm sorry if I seemed incompetent to some of you, I've had
this error for a long time and Google directed me here to find an
answer. I'm glad I could get help from some experienced folks.
Thanks!
On Feb 7, 4:46 pm, TreKing
On Tue, Feb 7, 2012 at 4:38 PM, Ozone Apps wrote:
> The line that causing the problem is:
>
> spinner.setAdapter(spinnerArrayAdapter);
>
If that's the line that causes the problem, and the problem is "null
pointer", then basic Java knowledge tells you your "spinner" variable is
null. If you read
The line that causing the problem is:
spinner.setAdapter(spinnerArrayAdapter);
The rest of the code is pasted above.
I've used other programs that use spinners, this one doesn't want to
work.
On Feb 6, 6:41 am, drac94 wrote:
> "Source Not Found" means you haven't linked the Android source
"Source Not Found" means you haven't linked the Android source code
into Eclipse, and you are trying to step into that code. The debugger
can't step into it if the source isn't available to it.
So, that is not the real problem for your spiner. Check the log cat
and try to locate the first error li
Try moving your call to setContentView before the call to findViewById. If
you don't have layout, findViewById won't find a view. I'm assuming your
NPE is on that spinner.setAdapter(...) line.
On Mon, Feb 6, 2012 at 22:30, Ozone Apps wrote:
> Sorry for being so vague the first time. I was in a
Sorry for being so vague the first time. I was in a rush! Heres the
code thats causing the error:
CODE
String[] spinnerArray =
getResources().getStringArray(R.array.a_chords);
Spinner spinner = new Spinner(this);
ArrayAdapter spinnerArrayAdapter = new
Array
6 matches
Mail list logo