0
我的應用程序停止當我點擊btn_shapes
在此代碼。該btn_alphabet
和btn_know
工作正常,但在btn_shapes
的申請停止。無鍵盤ID 0使用默認的鍵盤對應:/system/usr/keychars/qwerty.kcm.bin無鍵盤ID 0使用默認的鍵盤對應:/system/usr/keychars/qwerty.kcm.bin
public class Eng extends Activity implements OnClickListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.eng);
Button alphabet = (Button) findViewById(R.id.btn_alphabet);
alphabet.setOnClickListener((OnClickListener)this);
Button bshapes = (Button) findViewById(R.id.btn_shapes);
bshapes.setOnClickListener((OnClickListener)this);
Button know = (Button) findViewById(R.id.btn_know);
know.setOnClickListener((OnClickListener)this);
}
public void onClick(View v) {
// TODO Auto-generated method stub
switch(v.getId()){
case R.id.btn_alphabet:
Intent s_alphabet = new Intent(this, Alphabet.class);
startActivity(s_alphabet);
break;
case R.id.btn_shapes:
Intent s_shapes = new Intent(this, Bshapes.class);
startActivity(s_shapes);
break;
case R.id.btn_know:
Intent s_know = new Intent(this, Know.class);
startActivity(s_know);
break;
}
}
}
看看[這裏](http://stackoverflow.com/q/6321706/1465828) – Aprian
我不認爲日誌與您的應用程序相關在您的日誌中僅在FATAL EXCEPTION之下發布堆棧跟蹤 – nandeesh