我的应用程序已停止在模拟器上运行“不幸的是”。我有 logcat,但是我不明白如何解决这些错误。请帮我。提前致谢。这是日志猫
05-07 14:34:01.302: E/AndroidRuntime(713): FATAL EXCEPTION: main
05-07 14:34:01.302: E/AndroidRuntime(713): java.lang.RuntimeException: Unable to start activity ComponentInfo{my.calc/my.calc.CalcActivity}: java.lang.NullPointerException
05-07 14:34:01.302: E/AndroidRuntime(713): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
05-07 14:34:01.302: E/AndroidRuntime(713): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
05-07 14:34:01.302: E/AndroidRuntime(713): at android.app.ActivityThread.access$600(ActivityThread.java:123)
05-07 14:34:01.302: E/AndroidRuntime(713): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
05-07 14:34:01.302: E/AndroidRuntime(713): at android.os.Handler.dispatchMessage(Handler.java:99)
05-07 14:34:01.302: E/AndroidRuntime(713): at android.os.Looper.loop(Looper.java:137)
05-07 14:34:01.302: E/AndroidRuntime(713): at android.app.ActivityThread.main(ActivityThread.java:4424)
05-07 14:34:01.302: E/AndroidRuntime(713): at java.lang.reflect.Method.invokeNative(Native Method)
05-07 14:34:01.302: E/AndroidRuntime(713): at java.lang.reflect.Method.invoke(Method.java:511)
05-07 14:34:01.302: E/AndroidRuntime(713): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-07 14:34:01.302: E/AndroidRuntime(713): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-07 14:34:01.302: E/AndroidRuntime(713): at dalvik.system.NativeStart.main(Native Method)
05-07 14:34:01.302: E/AndroidRuntime(713): Caused by: java.lang.NullPointerException
05-07 14:34:01.302: E/AndroidRuntime(713): at my.calc.CalcActivity.onCreate(CalcActivity.java:30)
05-07 14:34:01.302: E/AndroidRuntime(713): at android.app.Activity.performCreate(Activity.java:4465)
05-07 14:34:01.302: E/AndroidRuntime(713): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
05-07 14:34:01.302: E/AndroidRuntime(713): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
05-07 14:34:01.302: E/AndroidRuntime(713): ... 11 more