I\'ve seen different advice on the best way to do this This question covers creating a jar. Elsewhere, I\'ve seen advice to simply copy the volley source into your own proje
dependencies {
compile 'com.android.volley:volley:1.0.0'
}
Add volley.jar as library
[MyProjectPath]/app/libs/ folderUse the source files from git (a rather manual/general way described here)
git clone https://github.com/git/git ... sry bad one, but couldn't resist ^^)git clone https://android.googlesource.com/platform/frameworks/volleycom folder from within [path_where_you_typed_git_clone]/volley/src to your projects app/src/main/java folder (Integrate it instead, if you already have a com folder there!! ;-))The files show up immediately in Android Studio. For Eclipse you will have to right-click on the src folder and press refresh (or F5) first.
Use gradle via the "unofficial" maven mirror
In your project's src/build.gradle file add following volley dependency:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
// ...
compile 'com.mcxiaoke.volley:library:1.+'
}
Click on Try Again which should right away appear on the top of the file, or just Build it if not
The main "advantage" here is, that this will keep the version up to date for you, whereas in the other two cases you would have to manually update volley.
On the "downside" it is not officially from google, but a third party weekly mirror.
But both of these points, are really relative to what you would need/want.
Also if you don't want updates, just put the desired version there instead e.g. compile 'com.mcxiaoke.volley:library:1.0.7'.