Import open-source libraries to projects built based on Android Studio
Since Google released the official version of Android Studio 1.0, more people have migrated to Android Studio for development. However, many open-source libraries and controls on the Internet were developed based on Eclipse in the past. Many people do not know how to import them to their Android Studio-based projects. I am also personally reminded on Weibo, let me write it. It's just early today. Let's write it. This section mainly introduces some common guide scenarios.
Preface
- -- Project // project directory
- |
- Build. gradle // the project's gradle configuration file
- |
- Settings. gradle // gradle settings. All modules are saved.
- |
- App // module Directory
- |__ Configuration of build. gradle module
- |
- Module2 // module2 directory
- |__ Configuration of build. gradle module
Similar to projects in eclipse, gradle/android studio can also have a module, put moudle under the project directory, and then in settings. add this module to gradle. The simplest method is to use the folder name. For example, in the above structure, the build. gradle file should be as follows:
- include ':app', ':module2'