Thanks to this site, my app is coming along nicely. However, it crashes when switching to a new activity I just created. There are 6 activities where the user answers questions, on Activity #5 in the sequence, the app crashes when I press the continue button. I get the standard "Unfortunately, App has stopped." When I press OK, the app closes and re-opens, and I am taken back to Activity #4, which retains the user input which I saved to SharedPreferences.
Log from the time I press the continue button:
02-27 08:42:54.231 7307-7307/com.health.hermes D/ViewRootImpl: MSG_RESIZED: ci=Rect(0, 96 - 0, 0) vi=Rect(0, 96 - 0, 0) or=1
02-27 08:42:54.541 7307-7307/com.health.hermes D/ViewRootImpl: ViewPostImeInputStage processPointer 0
02-27 08:42:54.611 7307-7307/com.health.hermes D/ViewRootImpl: ViewPostImeInputStage processPointer 1
02-27 08:42:54.621 7307-7307/com.health.hermes I/Timeline: Timeline: Activity_launch_request id:com.health.hermes time:1000022770
02-27 08:42:54.681 7307-7307/com.health.hermes D/TextView: setTypeface with style : 0
02-27 08:42:54.681 7307-7307/com.health.hermes D/TextView: setTypeface with style : 0
02-27 08:42:54.691 7307-7307/com.health.hermes D/AndroidRuntime: Shutting down VM
02-27 08:42:54.691 7307-7307/com.health.hermes E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.health.hermes, PID: 7307
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.health.hermes/com.health.hermes.KiPercentActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.EditText.setFilters(android.text.InputFilter[])' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3253)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)
at android.app.ActivityThread.access$1100(ActivityThread.java:221)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7225)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.EditText.setFilters(android.text.InputFilter[])' on a null object reference
at com.health.hermes.KiPercentActivity.onCreate(KiPercentActivity.java:30)
at android.app.Activity.performCreate(Activity.java:6876)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3206)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)
at android.app.ActivityThread.access$1100(ActivityThread.java:221)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7225)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
If you see the cause, kindly point out how I can better understand the logcat so I can start diagnosing myself. Thank you!