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

Stormy app failure

I am currently going through the Android Lists and Adapters Ben Jakuben

I have now added the hourly forecast recycler view and whenever I click the hourly or daily buttons the app crashes and says "unfortunately stormy has stopped". Any ideas on what is going wrong?

06-17 12:54:42.417 22254-22268/com.willisapps.stormy W/dalvikvm﹕ VFY: unable to find class referenced in signature (Ljava/nio/file/Path;) 06-17 12:54:42.417 22254-22268/com.willisapps.stormy W/dalvikvm﹕ VFY: unable to find class referenced in signature ([Ljava/nio/file/OpenOption;) 06-17 12:54:42.417 22254-22268/com.willisapps.stormy I/dalvikvm﹕ Could not find method java.nio.file.Files.newOutputStream, referenced from method okio.Okio.sink 06-17 12:54:42.417 22254-22268/com.willisapps.stormy W/dalvikvm﹕ VFY: unable to resolve static method 15344: Ljava/nio/file/Files;.newOutputStream (Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/io/OutputStream; 06-17 12:54:42.417 22254-22268/com.willisapps.stormy W/dalvikvm﹕ VFY: unable to find class referenced in signature (Ljava/nio/file/Path;) 06-17 12:54:42.417 22254-22268/com.willisapps.stormy W/dalvikvm﹕ VFY: unable to find class referenced in signature ([Ljava/nio/file/OpenOption;) 06-17 12:54:42.427 22254-22268/com.willisapps.stormy I/dalvikvm﹕ Could not find method java.nio.file.Files.newInputStream, referenced from method okio.Okio.source 06-17 12:54:42.427 22254-22268/com.willisapps.stormy W/dalvikvm﹕ VFY: unable to resolve static method 15343: Ljava/nio/file/Files;.newInputStream (Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/io/InputStream; 06-17 12:54:42.707 22254-22268/com.willisapps.stormy I/MainActivity﹕ From JSON: America/Los_Angeles 06-17 12:56:34.116 22254-22347/com.willisapps.stormy I/MainActivity﹕ From JSON: America/Los_Angeles 06-17 12:56:35.448 22254-22354/com.willisapps.stormy I/MainActivity﹕ From JSON: America/Los_Angeles 06-17 12:56:36.999 22254-22355/com.willisapps.stormy I/MainActivity﹕ From JSON: America/Los_Angeles 06-17 12:58:59.611 22254-22254/com.willisapps.stormy W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x416e3da0) 06-17 12:58:59.611 22254-22254/com.willisapps.stormy E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: com.willisapps.stormy, PID: 22254 java.lang.NullPointerException at com.willisapps.stormy.adapters.DayAdapter.getView(DayAdapter.java:52) at android.widget.AbsListView.obtainView(AbsListView.java:2743) at android.widget.ListView.makeAndAddView(ListView.java:1811) at android.widget.ListView.fillDown(ListView.java:697) at android.widget.ListView.fillFromTop(ListView.java:763) at android.widget.ListView.layoutChildren(ListView.java:1641) at android.widget.AbsListView.onLayout(AbsListView.java:2564) at android.view.View.layout(View.java:15762) at android.view.ViewGroup.layout(ViewGroup.java:4880) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1055) at android.view.View.layout(View.java:15762) at android.view.ViewGroup.layout(ViewGroup.java:4880) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453) at android.widget.FrameLayout.onLayout(FrameLayout.java:388) at android.view.View.layout(View.java:15762) at android.view.ViewGroup.layout(ViewGroup.java:4880) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1677) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1531) at android.widget.LinearLayout.onLayout(LinearLayout.java:1440) at android.view.View.layout(View.java:15762) at android.view.ViewGroup.layout(ViewGroup.java:4880) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453) at android.widget.FrameLayout.onLayout(FrameLayout.java:388) at android.view.View.layout(View.java:15762) at android.view.ViewGroup.layout(ViewGroup.java:4880) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2357) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2070) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1255) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6625) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:812) at android.view.Choreographer.doCallbacks(Choreographer.java:612) at android.view.Choreographer.doFrame(Choreographer.java:582) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:798) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:146) at android.app.ActivityThread.main(ActivityThread.java:5602) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099) at dalvik.system.NativeStart.main(Native Method)

Seth Kroger
Seth Kroger
56,413 Points

This looks like the salient bit:

FATAL EXCEPTION: main Process: com.willisapps.stormy, PID: 22254 java.lang.NullPointerException at com.willisapps.stormy.adapters.DayAdapter.getView(DayAdapter.java:52)

Doesn't like what your DayAdapter is doing at line 52.