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 trialTushar Raj
92 PointsError runtime null pointer exception
E/AndroidRuntime: FATAL EXCEPTION: main Process: com.tushar.raj.smellslikebaken, PID: 20478 java.lang.NullPointerException at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:5465) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4689) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4599) at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:1988) at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1384) at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1347) at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:574) at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3003) at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:2881) at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3265) at android.view.View.layout(View.java:14828) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525) at android.widget.LinearLayout.onLayout(LinearLayout.java:1434) at android.view.View.layout(View.java:14828) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453) at android.widget.FrameLayout.onLayout(FrameLayout.java:388) at android.view.View.layout(View.java:14828) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453) at android.widget.FrameLayout.onLayout(FrameLayout.java:388) at android.view.View.layout(View.java:14828) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.support.v7.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:435) at android.view.View.layout(View.java:14828) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453) at android.widget.FrameLayout.onLayout(FrameLayout.java:388) at android.view.View.layout(View.java:14828) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525) at android.widget.LinearLayout.onLayout(LinearLayout.java:1434) at android.view.View.layout(View.java:14828) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453) at android.widget.FrameLayout.onLayout(FrameLayout.java:388) at android.view.View.layout(View.java:14828) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2033) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1790) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1046) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5655) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761) at android.view.Choreographer.doCallbacks(Choreographer.java:574) at android.view.Choreographer.doFrame(Choreographer.java:544) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5052) 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:796) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:612) at dalvik.system.NativeStart.main(Native Method)
Emily Conroyd
6,512 PointsEmily Conroyd
6,512 PointsCan you please provide your code for mainactivity, and listfragment.