当我打开此页面时,应用程序意外停止,没有微调器选项没有问题,但是当我添加它们时,应用程序崩溃......
logcat 文本http://pastebin.com/umKP8iD0
package com.calc;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.widget.Adapter;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Button;
import android.widget.TimePicker;
import android.view.View;
public class setup extends Activity
{
TextView start, end;
TimePicker startTime, endTime;
Spinner day;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
String dayText[] = new String[6];
start = (TextView) findViewById(R.id.textView1);
end = (TextView) findViewById(R.id.textView2);
startTime = (TimePicker) findViewById(R.id.timePicker1);
endTime = (TimePicker) findViewById(R.id.timePicker2);
day = (Spinner) findViewById(R.id.spinner1);
dayText[0] = "Sunday";
dayText[1] = "Monday";
dayText[2] = "Tuesday";
dayText[3] = "Wednesday";
dayText[4] = "Thursday";
dayText[5] = "Friday";
dayText[6] = "Saturday";
ArrayAdapter adapter = new ArrayAdapter(this,
android.R.layout.simple_spinner_item, dayText);
day.setAdapter(adapter);
super.onCreate(savedInstanceState);
setContentView(R.layout.enterpage);
}
}
我想知道是否是因为微调器我创建错了?