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 Android Lists and Adapters (2015) Using Parcelable Data Retrieving Parcelable Data

Juan Andrés Quinones
Juan Andrés Quinones
3,212 Points

My list is showing an the empty message. What's the best way to find the error? How do I use the debugger to solve this?

I'm getting the "There is no data to display" after completing this video.

alex gwartney
alex gwartney
8,849 Points

im getting the same exact thing so hopefully some one can help out?

5 Answers

setListAdapter(adapter); add the above line

Darean Wong
Darean Wong
Courses Plus Student 4,186 Points

Thanks this fixed it. Added the code you mentioned under DailyForecastActivity.java; seems that we made the new adapter but didn't use it.

This should be in the teacher's notes to alert others about the problem.

Thank you so much!

Thanks! This was the problem for me, too!

I added the line setListAdapter(adapter); in the DailuForecastActivity but when I clicked the Daily button the app stopper. The error I get is this:

06-27 20:45:05.363 28062-28062/teamtreehouse.com.stormy I/dalvikvm-heap﹕ Grow heap (frag case) to 4.576MB for 1127532-byte allocation 06-27 20:45:05.403 28062-28062/teamtreehouse.com.stormy W/EGL_genymotion﹕ eglSurfaceAttrib not implemented 06-27 20:45:05.403 28062-28062/teamtreehouse.com.stormy W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0xa4ccab20) 06-27 20:45:05.407 28062-28062/teamtreehouse.com.stormy E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: teamtreehouse.com.stormy, PID: 28062 java.lang.NullPointerException at teamtreehouse.com.stormy.adapters.DayAdapter.getView(DayAdapter.java:84) at android.widget.AbsListView.obtainView(AbsListView.java:2255) at android.widget.ListView.makeAndAddView(ListView.java:1790) at android.widget.ListView.fillDown(ListView.java:691) at android.widget.ListView.fillFromTop(ListView.java:752) at android.widget.ListView.layoutChildren(ListView.java:1630) at android.widget.AbsListView.onLayout(AbsListView.java:2087) at android.view.View.layout(View.java:14817) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1055) at android.view.View.layout(View.java:14817) 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:14817) 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:14817) 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:14817) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:1983) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1740) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:996) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5600) 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:5001) 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:785) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) at dalvik.system.NativeStart.main(Native Method)

CAN SOMEONE PLEASE HELP ME?? THANKS!!!

I just copy paster the XML for the layouts on the project in the teachers notes and then it worked. Apparently there is some mistake on the XML presented on the videos as compared to the project in the teachers notes.

thanks!

Allan Fett
Allan Fett
14,709 Points

This was exactly my issue too. Thanks Horatio. I'm surprised this isn't in the teacher notes or a popup on the video.

Erik Carlson
Erik Carlson
1,792 Points

After adding the line Heratio mentioned I was then getting the crash that marcel had. I fixed it by going into the activity_daily_forecast xml and changing the layout width and height to match_parent instead of wrap_content. I don't know if I missed it during the videos or if it wasn't mentioned but that seems to have fixed the issue for me.