Androidstudio more and more people are using it, here's how Androidstudio joins third-party open-source class libraries like eclipse:
1. If the Open Source Library is hosted on GitHub, then you can directly join the Open source class library, but the individual does not recommend this, because in this case, the source code of the library is not convenient, Enter your project edit Build.gradle directory, add the introduction library description in dependencies, how to:
Add a diagram after the introduction of the library:
You need to introduce which library to go to the repository of GitHub's managed address of the including into your project directory under the code, and add it up.
2. The second method is to download the remote repository and put it on.
Download the open Source Library, place it in the same directory as the app directory, and edit the Setting.gradle ": Open Source Library folder name". For example, I placed the volley Open Source Library folder in the app's sibling directory, and then edited the Setting.gradle and changed the contents to:
| 1 |
include ‘:app‘, ‘:volley‘ |
Then go back to the Build.gradle file in your app directory and add it under the dependencies {} node:
| 1 |
compile project(‘:volley‘) |
This makes it possible to reference the local open Source library.
Androidstuido How to join a third party open source class library.