Volley Android Networking Library
I have few questions around using Volley in my projects:
$ git clone https://android.googlesource.com/platform/frameworks/volley
$ cd volley
$ android update project -p .
$ ant jar
Then, copy bin/volley.jar
into your libs/
folder and off you go!
source
In the Volley lesson, Google instructs as to either add Volley to our project as an Android Library project or as a .jar
file.
Here's how to create the Volley .jar
file using Android Studio or Eclipse :
NOTE:
In both cases I suggest renaming the .jar
file to the date of Volley's latest commit, ie volley_20150319.jar
, to keep versioning simple.
Android Studio:
[your local path to volley]/build/intermediate/bundles/
debug
and release
folders you'll find a JAR file called classes.jar
. libs/
folder. Eclipse:
libs/
folder. 1) Is this library can also be used as networking library in normal Java projects also OR is it strictly for Android Only
It is for Android only, as it depends on Android-specific classes. You can tell this by looking at the source code, for stuff like RequestQueue
.
2) I see multiple branches here and no documentation on which branch is to start with. Which branch should I use to start with?
The instructions from the Google I|O presentation were to just clone the git
repo, which would pull from the master
branch by default.
3) How to integrate this library in your own project? What approach is better: Make Volley as a standalone library project and spin a jar and put it in your project or Copy the all source code inside your project?
The instructions from the Google I|O presentation were to add the source code to your project. Personally, I find this to be a bizarre approach.
链接地址: http://www.djcxy.com/p/29502.html上一篇: OkHttp +使用双向SSL身份验证改进libssl崩溃
下一篇: 排球Android网络库