Cannot resolve symbol 'RequestQueue'
Asked Answered
P

5

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

Paramo answered 2/1, 2016 at 14:32 Comment(2)
add volley as module into your project then add dependency in setting section.Wellgrounded
I've added the module and this line is added to the dependencies in build.gradle : compile 'com.android.support:appcompat-v7:23.0.1'Paramo
W
12

add following to your build.gradle file

compile 'com.mcxiaoke.volley:library:1.0.19'
Wellgrounded answered 2/1, 2016 at 14:36 Comment(1)
The provided link leads to ads.Doig
Y
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'
}
Yammer answered 21/3, 2018 at 15:38 Comment(0)
I
3

Add this volley repo clone to your gradle dependencies:

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

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

Irremediable answered 2/1, 2016 at 14:40 Comment(0)
M
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

Mcdonnell answered 2/1, 2016 at 15:7 Comment(0)
S
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).

Sadesadella answered 2/1, 2016 at 14:40 Comment(2)
Add, those two are different things.Sadesadella
oh, cuz when i tried to add and gradle my project it comes error. but now not error heheYuan

© 2022 - 2024 — McMap. All rights reserved.