Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build an Interactive Story App (Retired) Finishing the User Interface Ending the Story

Brandon White
Brandon White
955 Points

Logcat does not show details of the NullPointerException

When comparing the logcat console output and comparing it with Ben's, I've noticed it is actually a bit different. It leaves out important information. All I'm getting is the following:

10-30 00:25:06.568 2444-2444/bz.bdu.interactivestory E/AndroidRuntime: FATAL EXCEPTION: main 10-30 00:25:06.568 2444-2444/bz.bdu.interactivestory E/AndroidRuntime: Process: bz.bdu.interactivestory, PID: 2444 10-30 00:25:06.568 2444-2444/bz.bdu.interactivestory E/AndroidRuntime: java.lang.NullPointerException 10-30 00:25:06.568 2444-2444/bz.bdu.interactivestory E/AndroidRuntime: at bz.bdu.interactivestory.ui.StoryActivity.loadPage(StoryActivity.java:64) 10-30 00:25:06.568 2444-2444/bz.bdu.interactivestory E/AndroidRuntime: at bz.bdu.interactivestory.ui.StoryActivity.access$100(StoryActivity.java:19) 10-30 00:25:06.568 2444-2444/bz.bdu.interactivestory E/AndroidRuntime: at bz.bdu.interactivestory.ui.StoryActivity$2.onClick(StoryActivity.java:79) 10-30 00:25:06.568 2444-2444/bz.bdu.interactivestory E/AndroidRuntime: at android.view.View.performClick(View.java:4438) 10-30 00:25:06.568 2444-2444/bz.bdu.interactivestory E/AndroidRuntime: at android.view.View$PerformClick.run(View.java:18422) 10-30 00:25:06.568 2444-2444/bz.bdu.interactivestory E/AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:733) 10-30 00:25:06.568 2444-2444/bz.bdu.interactivestory E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95) 10-30 00:25:06.568 2444-2444/bz.bdu.interactivestory E/AndroidRuntime: at android.os.Looper.loop(Looper.java:136) 10-30 00:25:06.568 2444-2444/bz.bdu.interactivestory E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5001) 10-30 00:25:06.568 2444-2444/bz.bdu.interactivestory E/AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method) 10-30 00:25:06.568 2444-2444/bz.bdu.interactivestory E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:515) 10-30 00:25:06.568 2444-2444/bz.bdu.interactivestory E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) 10-30 00:25:06.568 2444-2444/bz.bdu.interactivestory E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) 10-30 00:25:06.568 2444-2444/bz.bdu.interactivestory E/AndroidRuntime: at dalvik.system.NativeStart.main(Native Method)

Is there something that I may have misconfigured, or just a change in the versions of Android Studio since production?

What is the filter view in logcat set to? Can you change it to debug?

Brandon White
Brandon White
955 Points

I had it set to Verbose. So, I would think it would show the error message.

Try changing it? Or maybe there is no NPE in your code?