【发布时间】:2011-04-18 20:09:28
【问题描述】:
public class MyActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//R.layout.main has an illegal element (e.g. no layout_height attribute)
//But no exception is thrown at this line.
setContentView(R.layout.main);
} //Exception will be thrown after this line. Where to catch it?
}
【问题讨论】:
标签: android exception-handling android-widget android-layout android-xml