In the Android development process, we often need to introduce third-party open source project packages, but these projects are not all in the form of a jar package, GitHub download a lot of the source code package. Importing in Eclipse is easy, it's a little bit different in studio, It's very simple, actually.
1 First copy the library of the Open source project into our studio's engineering catalog, and it will be automatically refreshed in studio
2 Next you need to manually modify the project and directory under Settings.gadle add
Include ': App ', ': Yourlibraryname ' your library name
3. On the Module that needs to be introduced, right-click the Open module settings–>dependencies-> on the right of the + sign –>module library–> Select your class library
In fact, just add the following code to the module's Build.gradle
Dependencies {Compile project (': yourlibraryname')}
4. If there is an error, it is possible that the library's compilation environment is not correct, you can go into the library's build.gradle to modify the Gradle version
'com.android.tools.build:gradle:1.0.1' see Studio support for Gradle Ben }}
Android Studio introduces Open Source Library