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

Anastasia Polozova
PLUS
Anastasia Polozova
Courses Plus Student 2,320 Points

FATAL EXCEPTION: main... Attempt to invoke virtual method 'void android.widget.ImageView.setImageResource(int)' on a nul

Hello, I'm having hard time fixing this mistake. You can find my project here: https://github.com/BondarenkoDmitry/Cloudy

Here's what I see in the panel:

D/AndroidRuntime: Shutting down VM E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.android.cloudy, PID: 12188 java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.setImageResource(int)' on a null object reference at com.example.android.cloudy.adapters.DayAdapter.getView(DayAdapter.java:66)

It would be cool if you could help me find the bug and SUPER COOL if you can give me a hint at how you found it. Thanks!