How to identify exactly what causing NullPointerException?
08-14 20:25:56.703: E/AndroidRuntime(32491): FATAL EXCEPTION: main
08-14 20:25:56.703: E/AndroidRuntime(32491): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.joericharduz.akita/com.joericharduz.akita.MainActivity}: java.lang.NullPointerException
08-14 20:25:56.703: E/AndroidRuntime(32491): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
08-14 20:25:56.703: E/AndroidRuntime(32491): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
08-14 20:25:56.703: E/AndroidRuntime(32491): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
08-14 20:25:56.703: E/AndroidRuntime(32491): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
08-14 20:25:56.703: E/AndroidRuntime(32491): at android.os.Handler.dispatchMessage(Handler.java:99)
08-14 20:25:56.703: E/AndroidRuntime(32491): at android.os.Looper.loop(Looper.java:130)
08-14 20:25:56.703: E/AndroidRuntime(32491): at android.app.ActivityThread.main(ActivityThread.java:3687)
08-14 20:25:56.703: E/AndroidRuntime(32491): at java.lang.reflect.Method.invokeNative(Native Method)
08-14 20:25:56.703: E/AndroidRuntime(32491): at java.lang.reflect.Method.invoke(Method.java:507)
08-14 20:25:56.703: E/AndroidRuntime(32491): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
08-14 20:25:56.703: E/AndroidRuntime(32491): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
08-14 20:25:56.703: E/AndroidRuntime(32491): at dalvik.system.NativeStart.main(Native Method)
08-14 20:25:56.703: E/AndroidRuntime(32491): Caused by: java.lang.NullPointerException
08-14 20:25:56.703: E/AndroidRuntime(32491): at com.joericharduz.akita.MainActivity.onCreate(MainActivity.java:56)
08-14 20:25:56.703: E/AndroidRuntime(32491): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
08-14 20:25:56.703: E/AndroidRuntime(32491): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
08-14 20:25:56.703: E/AndroidRuntime(32491): ... 11 more
Please give your suggestions how to find NullPointerException.
Line 56 code:
etSearch.findViewById(R.id.etSearch);