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 trialQiyuan Zhang
10,581 PointsWhy does java.lang.NullPointerException (Look around JavaTester.java line 129) pop up for task 3?
The error message is not providing useful information anyway...
2 Answers
Qiyuan Zhang
10,581 PointsThanks Chris and Michael. I got the problem solved. It's due to one unnecessary keyword "static" when defining class.
Michael Farber
1,103 PointsHi Qiyuan, I agree with Chris. This happened to me once when I tried to call the findViewById method before setting the content layout in java. Maybe this is what's wrong with your code. If it's not, post it and we'll be able to help you more specifically:)
chrisverra
3,760 Pointschrisverra
3,760 Pointscould you post the code of that line?
I think in general a NulPointerException means that there is a reference variable that points to something that is not there(anymore?)