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