error inflating class xml文件中的无效类,常见原因是没有引用。
NullPointerException 常见原因是没有对变量进行初始化,变量的值为null。
findViewById中id名正确,但却无法找到id,可能是因为没有在SetContentView(R.layout)之后使用
在java中无法对String类型使用==判断,需用String.equals判断
在getApplicationContext()中如果出现空指针异常,是因为getApplicationContext方法要在onCreate方法之后调用