Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android Android Lists and Adapters (2015) Using Parcelable Data Retrieving Parcelable Data

NullPointerException When The button daily_Button clicked it's get error in my log

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference at com.cyanlabsid.navigation.stormy.weather.Forecast.getIconId(Forecast.java:41) at com.cyanlabsid.navigation.stormy.weather.Day.getIconId(Day.java:64) at com.cyanlabsid.navigation.stormy.adapter.DailyAdapter.getView(DailyAdapter.java:60) at android.widget.AbsListView.obtainView(AbsListView.java:2347) at android.widget.ListView.makeAndAddView(ListView.java:1864) at android.widget.ListView.fillDown(ListView.java:698) at android.widget.ListView.fillFromTop(ListView.java:759) at android.widget.ListView.layoutChildren(ListView.java:1673) at android.widget.AbsListView.onLayout(AbsListView.java:2151) at android.view.View.layout(View.java:15761) at android.view.ViewGroup.layout(ViewGroup.java:5039) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1077) at android.view.View.layout(View.java:15761) at android.view.ViewGroup.layout(ViewGroup.java:5039) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579) at android.widget.FrameLayout.onLayout(FrameLayout.java:514) at android.view.View.layout(View.java:15761) at android.view.ViewGroup.layout(ViewGroup.java:5039) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1557) at android.widget.LinearLayout.onLayout(LinearLayout.java:1466) at android.view.View.layout(View.java:15761) at android.view.ViewGroup.layout(ViewGroup.java:5039) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579) at android.widget.FrameLayout.onLayout(FrameLayout.java:514) at android.view.View.layout(View.java:15761) at android.view.ViewGroup.layout(ViewGroup.java:5039) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2090) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1847) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1065) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5901) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767) at android.view.Choreographer.doCallbacks(Choreographer.java:580) at android.view.Choreographer.doFrame(Choreographer.java:550) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:211) at android.app.ActivityThread.main(ActivityThread.java:5389) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)

Jaroslav Vankat
Jaroslav Vankat
12,054 Points

Could you post some code? It seems that you are comparing a null object reference with another object,

1 Answer

Jaroslav Vankat I've already done, thanks, it's just wrong with my textLabel id.

Jaroslav Vankat
Jaroslav Vankat
12,054 Points

Great, I'd say Ben is one of the best teachers here at Treehouse so enjoy the rest of the course!