Android Studio's summary of the process of importing open source frameworks:
Take the actual project case (ZHBJ) as a case
Step 1: Download SlidingMenu ( https://github.com/jfeinstein10/SlidingMenu )
Step 2: In the AS project (), copy the library folder in SlidingMenu-master to the new project folder (libraries) at the same level as the app folder
Step 3: Add include ':libraries:SlidingMenu/library' to the settings.gradle file
Step 4: Add dependency compile project(':libraries:SlidingMenu/library') in build.gradle(Module:app )
There are two ways: one is a visual mode, and the other is that we add it directly and manually
I used the first
After step 4, I will be prompted that there is an error here. Modify some parameters in the build.gradle of SlidingMenu, such as compileSdkVerdion and buildToolsVersion to match your AS
After modifying these two places, it should be ready to use!
If the following effect appears, it means that the open source framework SlidingMenu has been successfully imported into the project