Android Studio + Volley [duplicate]
Solution 1:
UPDATE: Volley is now official and is available through the JCenter. Here's how to import it:
implementation 'com.android.volley:volley:1.1.1'
DEPRICATED WAY:
Late to the party, but was able to import it by adding this to the build.gradle file:
dependencies {
compile 'com.mcxiaoke.volley:library:1.0.19'
}
Here is the link to unofficial Maven repo
NOTE: Volley v1.0.19 is current as of 02/05/2016. Please go to the Maven Repo (use link above), look up the latest version (line where artifactId = library
) and update the version in your gradle configuration accordingly.
Solution 2:
If you don't want to import it as a module but simply use it as a dependency you can create a jar using ant. In your volley directory just type ant jar and you will find a volley.jar in YOUR_VOLLEY_DIRECTORY/bin (you need to install apache ant if you don't have it)
You can copy the jar in the libs directory in your android app project (or create a libs directory if you don't have one) and add the dependency to build.gradle like this
compile files('libs/volley.jar')