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 trialeddy anouzi
2,885 PointsI tried all the alternative solutions for getDrawable but nothing works, I am using android studio 2.2.3
Error always shows: Attempt to invoke virtual method on a null 0bject reference
angel juarez
15,886 Pointsangel juarez
15,886 PointsI had a similar issue, here's the exception: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference---- My problem was that I did not use the setIcon method in the getCurrentDetails, this is the line that I forgot to use: currentWheater.setIcon(currently.getString("icon")); // I just added it and the app seems to work.