的原因當我打開這個網頁應用程序停止,意想不到的它有沒有問題,而微調選項,但是當我將它們添加應用程序崩潰...的Android應用程序崩潰,微調
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);
}
}
林想知道是否因爲微調我創造了錯誤?
你能發佈你的LogCat數據嗎?另外,嘗試在方法的最開始處放置'super.onCreate(savedInstanceState);'。 – Eric
在文章開頭添加了logcat – JPHamlett
]當然,我在編輯中提到的陣列問題,哦,歡迎來到SO。如果你還沒有看到它,你可能想看看這個[鏈接](http://meta.stackexchange.com/a/5235)。 – Barak