preface

If you have to download the open source library locally and open it with AndroidStudio every time, it will take too long. Here provides a convenient way to read open source projects, including open source library search, source preview, fast running.

1. Find open source libraries

Open source library collection website http://www.ctolib.com/ http://p.codekk.com/

2. Quick preview running open source projects

Chrome installed plugin octotree, without having to download directly in making preview open source library source code:

Git clone creates a local directory with git clone

CD to the root directory of the open source library, run the following command to install it on the test machine:./gradlew clean./gradlew installDebug

If the gradle version of the library is not the same as your local gradle, the app will start to download gradle

3. Use jCenter’s open source libraries directly in AndroidStudio

For example, if I want to use the open source library Okhttp, I can find the repository address of this library on Github and manually add it to build.gradle

compile 'com. Squareup. Okhttp3: okhttp: 3.8.0'
Copy the code

You can also search online directly under the project’s Dependency

After the project is synchronized, you can see the dependency library here

Right click on: LibraryProperties to find the local source download for this library: