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 from https://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
android cloning volley library

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.

android apache ant building volley
android building volley.jar

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.


Ravi is hardcore Android programmer and Android programming has been his passion since he compiled his first hello-world program. Solving real problems of Android developers through tutorials has always been interesting part for him.

  • fabian

    despues de descargar el jar solo se coloca en libs y listo no hay nada mas ?

  • shyam yammanuru

    Thanks, although then I run a

    “android update project -p .” I get

    “Error: . is not a valid project (AndroidManifest.xml not found).”

    OR else please provide latest volley.jar file.. Please

  • Anand Sharma

    when i type android update project -p .then comes

    ‘android’ is not recognized as an internal or external command,
    operable program or batch file.

    how to solve it??????

  • Mujtaba Al Neama


    git checkout 008e0cc8 //To bypass Error: . is not a valid project (AndroidManifest.xml not found).

  • RISHABH Chauhan

    showing error at last (ant jar ) on compilation error Build failed ….
    soneone help me in getting out of this error https://uploads.disquscdn.com/images/3064c82660b44de3ba23d8803b1b05c24ac002024c1bf7bdb3c42931e9299c94.png

    • I am sure you are using Android Studio for development. Instead of adding the .jar file add the dependencies in the build.gradle. Check this article

      • RISHABH Chauhan

        sorry brother..i m using eclipse thats why i need to make a volley jar file..

        • Why are you still using Eclipse?

          • RISHABH Chauhan

            i am working in this before 2-3 months … but now i am getting errors.
            should i need to switch.

          • I can solve your volley error. But switch to Android Studio right away.

          • RISHABH Chauhan

            ok i will switch to android studio but also help me in getting out of this problem

          • Sorry! If I tell u now, you won’t move to Android Studio 🙁

          • RISHABH Chauhan

            lol ! but why?

          • Cenk Camkıran

            looooooooooool 😀

  • Kiarie Ray

    Everything is running smoothly except when i type android update project -p . in cmd i get this error:
    ‘android’ is not recognized as an internal or external command,
    operable program or batch file.
    how do i solve this?

  • Vempati Satya Suryanarayana

    A very nice tutorial. Things made easy on an important topic.

    • Hello

      But now we can use the libraries as dependencies instead of .jar files.

      • Vempati Satya Suryanarayana

        Thank you for d info