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 trialAlexis Boyer
818 PointsAuto completion not showing SetOnclickListener
I choose to only support Lollipop is that the reason?
1 Answer
adam stein
17,057 PointsSorry for having just noticed this question now. Hopefully this answer can still be of use to someone...
Java is a case sensitive language. By capitalizing the 'S' in "SetOnclickListener" your IDE is reading it as an entirely new method hence autocomplete is ignoring you. EVERYONE MAKES MISTAKES LIKE THESE. I still do all the time. I've even seen TreeHouse instructors gloss over a typo and try to run their application.
As a side note, a common convention in many programming languages is naming fields and methods with camel case ie 'setOnclickListener'. https://en.wikipedia.org/wiki/CamelCase.
As another side note, I can't stress how helpful it was for my own learning to switch over to the java track before diving into this one. I have hardly mastered the language, but after returning to this track, I can follow along with greater ease. Unlike my first attempt at this track, I don't feel as though I'm just taking Ben's word for everything. Having knowledge of object oriented programming to rely on as a reference point is quickly paying off!
Alexis Boyer
818 PointsAlexis Boyer
818 PointsGents?