13

I am new to android studio and volley library so please bear with me.

I've added volley library by GitHub and then and added this line to build gradle file:

compile 'com.android.support:appcompat-v7:23.0.1'

And now I am trying some tutorials about request and response from api, but for some reason I cannot make an instance of RequestQueue why? I am using Android 4.0.3 IceCreamSandwish

Thank you

qtmfld
  • 2,916
  • 2
  • 21
  • 36
Guest012393
  • 255
  • 1
  • 4
  • 15

5 Answers5

12

add following to your build.gradle file

compile 'com.mcxiaoke.volley:library:1.0.19'
Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
CodingRat
  • 1,934
  • 3
  • 23
  • 43
4

Google have added it to their own documentation pages and GitHub https://developer.android.com/training/volley/index.html

The dependency can be added using:

dependencies {
    ...
    implementation 'com.android.volley:volley:1.1.0'
}
Aaron Thompson
  • 1,849
  • 1
  • 23
  • 31
3

Add this volley repo clone to your gradle dependencies:

compile 'com.mcxiaoke.volley:library:1.0.19'

https://github.com/mcxiaoke/android-volley

headsvk
  • 2,726
  • 1
  • 19
  • 23
2

Add the Volley library as a dependency in the module build.gradle file.

dependencies {
    compile 'com.he5ed.lib:volley:android-cts-5.1_r4'
}

This is another mirror of the Google Volley library https://github.com/he5ed/volley

Grace Coder
  • 804
  • 11
  • 19
1

I would add it in the build.gradle:

compile 'com.mcxiaoke.volley:library:1.0.19'

you were adding

compile 'com.android.support:appcompat-v7:23.0.1'

which is a completely different thing (a backwards COMPATibility library for older API levels).

sschrass
  • 7,014
  • 6
  • 43
  • 62