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 trialoscar gonzalez
7,072 PointsHello I got trouble with this activity, I made all this step as the video But I got an error in getActivity();
hello I made all that the video teach me, But i got an error, I wrote the same code as video did, equals i mean i checked over and over again and all is the same, In the line Context context = getActivity(); it's mark as an error, please let me know what I am doing wrong?
Maybe the current version to I use is android studio 1.1 in the video is the old version than this.
3 Answers
jason phillips
18,131 PointsCan you post the class file?
oscar gonzalez
7,072 Pointsit said unreachable statement!!! what does it mean?
oscar gonzalez
7,072 Pointsit said unreachable statement!!! what does it mean?
oscar gonzalez
7,072 Pointsoscar gonzalez
7,072 Points[https://www.facebook.com/photo.php?fbid=10204054866640509&set=a.1610612313751.2075674.1489537065&type=1&theater]
This is the link please help me!!
jason phillips
18,131 Pointsjason phillips
18,131 Pointswhen you hover your cursor over the error what does it say?
oscar gonzalez
7,072 Pointsoscar gonzalez
7,072 Pointsit said unreachable statement!!! what does it mean?
jason phillips
18,131 Pointsjason phillips
18,131 Pointsahh ok you have a return statement just inside your onCreate function. When you return inside a function, it will not process past that spot. Remove return and you should be all set.