原文来自:http://tips.androidhive.info/2015/08/android-how-to-download-and-make-volley-jar/
 
1 Comment . By Ravi Tamada . on August 31, 2015

If you are using Android Studio, adding volley support can done just by adding ‘compile com.mcxiaoke.volley:library-aar:1.0.0‘ to gradle.build dependencies module.

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
 
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
}

However if you want to generate the volley.jar manually, below steps will helps you in getting it done.

Downloading & Making volley.jar

We will start with installing tools required to clone and build volley project. For this we need git (to clone the project) and ant (to build) tools.

Installing Git
Git software is used to clone git projects into your local workspace. Download & install git, once installed run git command in terminal just to make sure that it is accessible via command line. If you are getting git command not found error, add the git installation directory to environmental variables.

Installing apache ant
Apache ant is a command-line tool used to build the source code. Download ant fromhttps://ant.apache.org/bindownload.cgi and add the bin path to environmental variables. You should able to execute ant command too in terminal.

Cloning volley library
Open command prompt, navigate to a location where you want to clone volley and execute following command. This will download a copy of volley library into your local drive.

git clone https://android.googlesource.com/platform/frameworks/volley

Making volley.jar
You can use the volley as a library project to your main project or you can simply generate volley.jar and paste it in project libs folder. To generate volley.jar, move into volley dir (cd volley) and execute below commands.

android update project -p .
 
ant jar

You can find generated volley.jar in volley bin folder.

The following video will show you the process of building volley project.

If you are unsuccessful in building the volley, meanwhile you can download volley.jar here.

Adding volley.jar to your project
Once the volley.jar is generated, simply paste it in your project’s libs folder.

Share this article on

[转]Android How to Download and Make Volley.jar的更多相关文章

  1. Android应用开发:网络工具——Volley(一)

    引言 网络一直是我个人的盲点,前一阵子抽空学习了一下Volley网络工具的用法,也透过源代码进行了进一步的学习,有一些心得想分享出来.在Android开发中,成熟的网络工具不少,Android自带了H ...

  2. Android应用开发:网络工具——Volley(二)

    引言 在Android应用开发:网络工具--Volley(一)中结合Cloudant服务介绍了Volley的一般使用方法.当中包括了两种请求类型StringRequest和JsonObjectRequ ...

  3. android混淆打包配置(忽略第三方jar)

    在project.properties里加上   proguard.config=proguard.cfg proguard.cfg 配置如下: -optimizationpasses 5-dontu ...

  4. Android OS 源码 引入和编译 jar / so库

    Android -- 源码平台下JAR包的引入与编译https://blog.csdn.net/csdn_of_coder/article/details/64538227 BUILD_JAVA_LI ...

  5. Android tips(八)-->Android Studio打包apk,aar,jar包

    文本我们将讲解android studio打包apk,aar,jar包的相关知识.apk包就是android系统的安装包,这里没什么好说的,aar包是android中独有的类库包,而jar包是java ...

  6. android studio 代码混淆如何忽略第三方jar包

    日前在打包混淆包含第三方jar包的Android studio项目时 报出了各种错误,但是debug版本却能正常运行,于是怀疑android studio 打包的时候把第三方jar包给混淆了,第三方j ...

  7. Android Studio打包apk,aar,jar包

    转载请标明出处:一片枫叶的专栏 文本我们将讲解android studio打包apk,aar,jar包的相关知识.apk包就是android系统的安装包,这里没什么好说的,aar包是android中独 ...

  8. 快速Android开发系列网络篇之Volley

    Volley是Google推出的一个网络请求库,已经被放到了Android源码中,地址在这里,先看使用方法 RequestQueue mRequestQueue = Volley.newRequest ...

  9. Android学习笔记——download

    该工程的功能是实现从网上的链接下载一个lrc文件和一个mp3文件 以下代码是MainActivity.java中的代码 package com.example.download; import com ...

随机推荐

  1. java String 中 intern方法的概念

    1. 首先String不属于8种基本数据类型,String是一个对象. 因为对象的默认值是null,所以String的默认值也是null:但它又是一种特殊的对象,有其它对象没有的一些特性. 2. ne ...

  2. php开发工具之火狐浏览器插件

    相信做开发的都有一种火狐情怀吧!  下面来介绍下一些自己在php开发工程中用到几个火狐浏览器插件. 1.[firebug]: 这个插件可以说是一个神奇,功能不用过对介绍. 2.[hostAdmin]: ...

  3. Nginx-tomcat-redis------负载均衡以及session共享

    测试环境 Nginx 1.10.1 tomcat 7.0.70 Redis-x64-3.2.100 说明 tomcat 8 和 redis 实现session共享 有问题. 寻找源码 发现tomcat ...

  4. jQuery源码-dom操作之jQuery.fn.text

    写在前面 jQuery.fn.text在jQuery是个使用频率比较高的接口,它的作用无非是设置/获取dom节点的内容文本,下文会通过几个简单的例子来说明.text()接口的使用,以及最后会对源码进行 ...

  5. sql是如何执行一个查询的!

    引用自:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ Understanding how SQ ...

  6. [译]Node.js面试问与答

    原文: http://blog.risingstack.com/node-js-interview-questions/ 什么是error-first callback? 如何避免无休止的callba ...

  7. 计划安装SQL Server2012需求详细

    1.查看 SQL Server2012 安装的安装要求.系统配置检查和安全注意事项. 1.1 硬件要求 [参考资料http://msdn.microsoft.com/zh-cn/library/ms1 ...

  8. 第一个C++例子

    #include <iostream> using namespace std; class Time { private: int hour; int minute; int secon ...

  9. Spark之scala

    一.什么是scala scala 是基于JVMde 编程语言.JAVA是运行在jvm上的编程语言,java 源代码通过jvm被编译成class 文件,然后在os上运行class 文件.scala是运行 ...

  10. shell简单使用

    最近需要用到shell脚本实现关机保护作用,总结下语法 要点: 1.linux下编写的shell脚本不能在window下编写,否则会出现^M的错误,用window编写保存,在linux用vim打开,每 ...