In 3 basics steps,you can add volley to your project:
Step 1:First, you need to get the Volley source code:
- Use Git to checkout the source code for Volley, preferably to the filesystem where your Android project lives.
- git clone https://android.googlesource.com/platform/frameworks/volley
Step 2: Include Volley as a module inside your current Android project:
- Go to File -> Import Module
- select the directory called ‘volley’ where you checked out the volley project from step one.
Step 3: Update your project config so that your main project module is dependent on the volley module.
- The settings.gradle file should contain your main app module name and also the volley module you have just added. In the picture below, both my modules are listed in this file.
- You also have to go into the build.gradle file of your main module. Add a line in your dependencies that says ‘compile project(‘:volley’). What’s inside those parentheses should match what is in your setting.build file.
P.S. If you did it correctly, you should see in your build variant window, an additional configuration for Volley.
0 Comment(s)