Transferred from: http://www.codes51.com/article/detail_183523.html
Now see how Android Studio use third-party library ~ Online to find a lot of tutorials seems to have a problem, I tried it, simple, pro-test effective
First step: Prepare the library file in Android Studio format
Import Slidingmenu in Android Studio (detailed)
As in the introduction of GitHub Open Source Project Slidingmenu Summary, I started as import Slidingmenu when also Baidu a lot of articles, write is not very detailed, so import success, wrote this article, I want to be inspired by the small partners who want to use Androidstudio to import slidingmenu.
First on the final animation
First step: Download Slidingmenu (Https://github.com/jfeinstein10/SlidingMenu)
Step two: In the project, click Import Module, File--New
1. Select Library
2, if already contains this module, will appear after the exclamation point hint, the first time certainly did not have
If the import is successful, you can see the imported modules in the library
Step three: Modify the Build.gradle file of the library file
Build.gradle file to match
1. The Build.gradle file under the imported module
2. build.gradle file under App module
Build.gradle files under the app module
Here is the Build.gradle in the modified library file.
Fourth Step: Locate the project's Build.gradle file under Project view, replacing the classpath of the library file
Fifth step: This is not a universal step (can be ignored)
Slidingmenu is used in the Android.util.FloatMath class, the import will be error, because this class is obsolete, it is recommended to use the Java.lang.Math class ~ only need to find the corresponding error, the Floatmath replaced with the math class can be
Sixth step: Set up Project Dependencies
In the form of Add module dependency, associate the library file; then clean it up project~
Slidingmenu is waiting for you to toss.
In this case, the process of importing third-party libraries into Android studio should be similar.
How Android Studio imports the Slidingmenu class library