Android: Import DrawerLayout cannot be resolved

爱⌒轻易说出口 提交于 2019-11-30 17:57:57

How do I update the JARs in libs?

I usually do it by copying the file. You will find the JARs inside $ANDROID_SDK/extras/android/support, where $ANDROID_SDK is wherever your Android SDK is installed.

If you use Eclipse, if you copy this at the filesystem level, and Eclipse is open, press <F5> with the project highlighted in Package Manager so Eclipse picks up the changes. Easier is to drag it out of the SDK and drop the JAR into libs/ right in Eclipse, which will both update the filesystem and let Eclipse know about the change.

It's possible that the Eclipse option to add the JARs (right-click over the project, then choose Android Tools > Add Support Library... from the context menu) will also do this. That particular approach doesn't work for me due to some peculiarities with my development environment.

Copy the support jar from the Android SDK into your libs folder. Should be in <ANDROID SDK FOLDER>\extras\android\compatibility\v13.

In android studio, I found that adding dependencies solved the problem.

In the file menu find project structure. Under 'app', look for the dependencies tab. Click the green plus at the right hand side. Select library dependency.

I added both support-v4 and support-v13.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!