例外、これ以上のものはありません。通常、logcatにはより有用な情報がありますが、この場合、残念ながらそれほど多くはありません。
07-06 13:26:26.654: E/AndroidRuntime(726): java.lang.NullPointerException
07-06 13:26:26.654: E/AndroidRuntime(726): at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:355)
07-06 13:26:26.654: E/AndroidRuntime(726): at android.widget.ArrayAdapter.getView(ArrayAdapter.java:323)
07-06 13:26:26.654: E/AndroidRuntime(726): at android.widget.AbsSpinner.onMeasure(AbsSpinner.java:192)
07-06 13:26:26.654: E/AndroidRuntime(726): at android.view.View.measure(View.java:8313)
07-06 13:26:26.654: E/AndroidRuntime(726): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138)
07-06 13:26:26.654: E/AndroidRuntime(726): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1017)
07-06 13:26:26.654: E/AndroidRuntime(726): at android.widget.LinearLayout.measureVertical(LinearLayout.java:386)
07-06 13:26:26.654: E/AndroidRuntime(726): at android.widget.LinearLayout.onMeasure(LinearLayout.java:309)
07-06 13:26:26.654: E/AndroidRuntime(726): at android.view.View.measure(View.java:8313)
07-06 13:26:26.654: E/AndroidRuntime(726): at android.widget.ScrollView.measureChildWithMargins(ScrollView.java:1074)
07-06 13:26:26.654: E/AndroidRuntime(726): at android.widget.FrameLayout.onMeasure(FrameLayout.java:250)
07-06 13:26:26.654: E/AndroidRuntime(726): at android.widget.ScrollView.onMeasure(ScrollView.java:296)
07-06 13:26:26.654: E/AndroidRuntime(726): at android.view.View.measure(View.java:8313)
07-06 13:26:26.654: E/AndroidRuntime(726): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138)
07-06 13:26:26.654: E/AndroidRuntime(726): at android.widget.FrameLayout.onMeasure(FrameLayout.java:250)
07-06 13:26:26.654: E/AndroidRuntime(726): at android.view.View.measure(View.java:8313)
07-06 13:26:26.654: E/AndroidRuntime(726): at android.widget.LinearLayout.measureVertical(LinearLayout.java:531)
07-06 13:26:26.654: E/AndroidRuntime(726): at android.widget.LinearLayout.onMeasure(LinearLayout.java:309)
07-06 13:26:26.654: E/AndroidRuntime(726): at android.view.View.measure(View.java:8313)
07-06 13:26:26.654: E/AndroidRuntime(726): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138)
07-06 13:26:26.654: E/AndroidRuntime(726): at android.widget.FrameLayout.onMeasure(FrameLayout.java:250)
07-06 13:26:26.654: E/AndroidRuntime(726): at android.view.View.measure(View.java:8313)
07-06 13:26:26.654: E/AndroidRuntime(726): at android.view.ViewRoot.performTraversals(ViewRoot.java:839)
07-06 13:26:26.654: E/AndroidRuntime(726): at android.view.ViewRoot.handleMessage(ViewRoot.java:1859)
07-06 13:26:26.654: E/AndroidRuntime(726): at android.os.Handler.dispatchMessage(Handler.java:99)
07-06 13:26:26.654: E/AndroidRuntime(726): at android.os.Looper.loop(Looper.java:130)
07-06 13:26:26.654: E/AndroidRuntime(726): at android.app.ActivityThread.main(ActivityThread.java:3683)
07-06 13:26:26.654: E/AndroidRuntime(726): at java.lang.reflect.Method.invokeNative(Native Method)
07-06 13:26:26.654: E/AndroidRuntime(726): at java.lang.reflect.Method.invoke(Method.java:507)
07-06 13:26:26.654: E/AndroidRuntime(726): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
07-06 13:26:26.654: E/AndroidRuntime(726): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
07-06 13:26:26.654: E/AndroidRuntime(726): at dalvik.system.NativeStart.main(Native Method)
私のレイアウトxmlの始まりは(xmlの前半で何かばかげたものを見逃したのではないかと思います)journey.xmlです。
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:baselineAligned="false"
android:orientation="horizontal"
android:weightSum="2" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical" >
//Skipped some code I think wont help debug this
<Spinner
android:id="@+id/startInMinutes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
最初のアクティビティは、このアクティビティを呼び出します。以下のアクティビティの最初の数行。
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.journey);
// Some more code
// Adapter related code for ListView
vehicleListView = (Spinner) findViewById(R.id.vehicleList);
vehicleListView.setAdapter(new ArrayAdapter<String>(this,
android.R.layout.simple_spinner_item, vehicleList));
vehicleListView.setOnItemSelectedListener(this);
vehicleListView.setSelection(0);
編集:根本的な原因は、vehicleList配列にnull値があったことです。