Cannot resolve symbol newRequestQueue - Volley

时间:2015-10-31 00:12:45

标签: android android-studio android-volley

I have this bit of code in the MainActivity file RequestQueue queue = new Volley.newRequestQueue(this); and for some reason the newRequestQueue part is red and when I hover over it I get Cannot resolve symbol 'newRequestQueue'. How can I solve this ?

2 个答案:

答案 0 :(得分:2)

请参阅https://developer.android.com/training/volley/requestqueue.html

试一试:

RequestQueue queue = Volley.newRequestQueue(this);

答案 1 :(得分:1)

你只需删除<新>它将被解决