First app and so really new at android (played around about a year ago but nothing came of it), decent at programming. Wanting to make sure app renders on a phone, no functi
Your logcat has a NullPointerException.
E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: com.hydr0dr4gon.splitrv2, PID: 10290 java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:394)
Something is not initialized. From your code I cannot see what it would be. Do you have an ArrayAdapter and if so you you initialize it and all the objects it contains? Or is your table just filled by your layout file? I would start looking at how your table is filled (based on the logcat) but I can't see specifically what the problem would be from the code you posted.
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference
at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:394)
at android.widget.ArrayAdapter.getView(ArrayAdapter.java:362)
at android.widget.AbsSpinner.onMeasure(AbsSpinner.java:193)
at android.widget.Spinner.onMeasure(Spinner.java:482)
This tells you that the error was measuring the Spinner
. More exactly, one of the strings that should be displayed inside it is null.
The most likely cause is a problem with the @array/arraySplitr
resource. Is it a valid string-array
resource as defined in the documentation?
This:
<array name="arraySplitr">
<item>2</item>
...
should be instead:
<string-array name="arraySplitr">
<item>2</item>
...
The array
element is for Typed Arrays. String arrays must use string-array
.