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 trialTimothy Lusk
912 PointsMy "Log.d string" is coming back with an error.
While following the video and adding the Log.d string for the "FunFactsActivity" information, it comes back saying "cannot resolve symbol 'Log'".
3 Answers
Stone Preston
42,016 Pointsyou need to add an import statement for the Log class at the top of your activity.
add the following below your other imports
import android.util.Log;
when using Android Studio, use the autcomplete feature to autocomplete class names when you type them out, that way it imports it automatically for you and you dont have to worry about importing it yourself. In this case you simply typed out Log without choosing it from autocomplete, so it did not import it automatically for you. Also I believe if you hover over the word Log on the line giving the error and press alt + enter it should pop up a menu where you can choose to import the class
Timothy Lusk
912 PointsYah, I found the fix. Thank you. :-)
Brijesh Bharadwaj
4,705 PointsStone Preston : I did that, but still continue to get the "Cannot resolve symbol 'd'" error.