0
我正在嘗試使應用程序,它正在工作,但現在,當我在模擬器中運行它,它甚至不給我歡迎屏幕。代碼:我的android應用程序不運行?
public class TestArabActivity extends Activity {
/** Called when the activity is first created. */
TextView tvTop,tvBottom;
TableLayout tlStart;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.welcome_screen);
//init variables
initVars();
}
private void initVars(){
tvTop = (TextView) findViewById(R.id.tv_start_TopTittle);
tvBottom = (TextView) findViewById(R.id.tv_strat_BottomTittle);
tlStart = (TableLayout) findViewById(R.id.tl_start);
}
}
我使用的調試,看到了這些:
- 的
savedInstanceState
= NULL 的tvTop
- 值,該值
tvBottom
和tlStart
爲空也
爲什麼那些值是空的?我知道這是問題所在。
任何人都知道如何解決它?謝謝。
你可以發佈的所有代碼也與清單文件,你在哪裏使用tvTop,tvBottom和tlStart? – Sunny