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 trialvin kum
3,546 PointsLog.d(); has to be created inside the Oncreate method of Android Studio?
When I'm practicing to make apps in Android Studio, I noticed that the Log.d method is working when it is in the OnCreate method, or else it is showing d as ' cannot resolve symbol d'.. why so?
1 Answer
Steve Hunter
57,712 PointsHi there,
As Andrey said, the Log.d()
command should work pretty much anywhere so I'm not sure why you're getting an error. Let's have a look at your code and figure that out!
Steve.
Andrey Valverde
641 PointsAndrey Valverde
641 PointsThe log method is supposed to word on any method you put it on, can you add the error and some code to look at please, it will be very helpful