Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Android Studio doesn't recognize this dependency library?

Tags:

android

gradle

I have been using gradle library dependencies for a while.

Some of them are deprecated, but even though they are no longer maintened, they still very useful.

I'm trying to implement this MenuDrawer library but Android Studio fails to import the classes.

enter image description here

On the other hand, it succeeds to import the gradle dependency.

dependencies {
    compile 'net.simonvt.menudrawer:menudrawer:3.0.4'
}

CHANGELOG

Any thoughts?

like image 777
Machado Avatar asked Aug 05 '15 17:08

Machado


1 Answers

You need to sync project with gradle provided dependencies. This usually is asked for once you edit gradle file, but you may start it by hand via menu Tools -> Android -> Sync Project With Gradle Files. Then you can ALT+Enter while having cursor on MenuDrawer text to see if there's option to import something related.

BTW: 3.0.6 is most recent version, so check it first to see if that solves the issue.

Finally, you should consider using Support Library's implementation perhpas instead: https://developer.android.com/training/implementing-navigation/nav-drawer.html

like image 59
Marcin Orlowski Avatar answered Nov 11 '22 01:11

Marcin Orlowski