我收到这个错误ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord, Intent) line: 2585当我开始一个意图
public class SingleMenuItemActivity extends Activity {
TextView lblName;
TextView lblyest;
TextView lbltoday;
TextView lblHigh;
TextView lblLow;
TextView lblChange;
TextView lblPcchange;
String name,yesterday,today,high,low,change,pcchange;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.single_list_item);
lblName = (TextView) findViewById(R.id.name);
lblyest = (TextView) findViewById(R.id.yesterday);
lbltoday = (TextView) findViewById(R.id.today);
lblHigh = (TextView) findViewById(R.id.high);
lblLow = (TextView) findViewById(R.id.low);
lblChange = (TextView) findViewById(R.id.change);
lblPcchange = (TextView) findViewById(R.id.pcchange);
Intent in = getIntent();
name = in.getStringExtra("name");;
yesterday = in.getStringExtra("yesterday");
today =in.getStringExtra("today");
high =in.getStringExtra("high");
low = in.getStringExtra("low");
change = in.getStringExtra("change");
pcchange =in.getStringExtra("pcchange");
//Error doesnt happen when the lines below are commented
lblName.setText((CharSequence)name.toString());
lblyest.setText(yesterday.toString());
lbltoday.setText(today.toString());
lblHigh.setText(high.toString());
lblLow.setText(low.toString());
lblChange.setText(change.toString());
lblPcchange.setText(pcchange.toString());
}
}
我知道当我执行 settext() 函数时会触发错误,但我不知道如何修复它