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 trial

Android The Options Menu

Dmitry Bruhanov
Dmitry Bruhanov
8,513 Points

The Options Menu with Ben Deitch - problems with the "import com.bumptech.glide.Glide;"

Since the teacher did not start the project from the scratch, I copied the code from the teacher's notes below the video. My Android Studio is not familiar with the library "com.bumptech.glide.Glide;" I followed the link the teacher added to the GitHub repository. There're multiple folders and files with comments and bug fixes. What must be downloaded and where is it usually stored to let Android "see" this library? Thanks in advance for your swift responce, since so far this stops me from following the teacher's code...

3 Answers

Michael Stoddart
Michael Stoddart
4,677 Points

Hi Dmitry, if you add this line to your gradle file: compile 'com.github.bumptech.glide:glide:3.7.0' Then sync your gradle, this should fix your problem. Android studio cant recognise the import because the library isn't in your project yet.

Anik Devaughn
Anik Devaughn
7,751 Points

Hi, I was also having the same problem but adding this line of code compile 'com.github.bumptech.glide:glide:3.7.0' in my gradle file works for me so far. But I would suggest or it will be helpful for many of us students if you can explian it little bit clearly as where to find this file or where to add this code. I was having so much trouble to find the gradle file ( if you could give exact path) as because when unziping the Colorizer-master.Zip file , it is hard to see which exact file do you mean. I hope you got my point. But Thanks again as this line of code Help a lot even I spend 2 hours searching for solution :)

Hi Dmitry,

Sorry, I haven't done this course. However, if you look in the Github repo, there is very likely to be a line of code that you want to add to your Gradle file within your Android Project.

Have a look in the installation instructions for Bumptech - usually, we add this libraries to the relevant build file and Android Studio manages the installation for us.

Let me know how you get on - send me links to the course and Github if you didn't figure it out. Sorry to be of no specific help.

Steve.

Dmitry Bruhanov
Dmitry Bruhanov
8,513 Points

Thank you Michael!

I whent through Ben Ditche's course about the menus by simply omitting the code that did not work and concentrating on the part concerning the subject of the course - the menus themselves. And it also worked.

However, when I later took a cource of Ben Jacuben he tought how to add new libruaries, so, by now I already know how to do this, but anyway, thanks for your reply.

Now that I know that this answer is correct, in order to help other students with the same question I'm giving you the "Best Answer".