简体   繁体   中英

Why Android Studio doesn't recognize this dependency library?

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.

在此输入图像描述

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

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

CHANGELOG

Any thoughts?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM