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.

TZECHUNG KAO
11,238 PointsNullPoniterException using fragment_sign_up.xml
I have to use fragment to create new signup activity with the latest Eclipse IDE. I was using fragment_sign_up.xml instead of activity_sign_up.xml. I tried to add codes for mSignUpTextView.setOnClickListener in On_Create method, I got NullPointerException error on running.
3 Answers

Eric De Wildt
Courses Plus Student 13,077 PointsThe null pointer error report should tell you what line the problem code is on. This is a fine place to start looking for the problem.

TZECHUNG KAO
11,238 PointsThanks. I found the line within LoginActivity.java. The object mSignUpTextView was not created on the fragment_sign_up.xml layout when it is called within LoginActivity .java. The lesson did not tell us how to go around this problem using fragment layout instead not using fragment layout in building a SelDestructing Meesage Android App. I was forced to use fragment layout for the latest Android plug in for Eclipse.

Nadeem Sarwar
Courses Plus Student 31 PointsTZECHUNG KAO: Can you tell me how you resolved the error? The entire code