无法解析符号Volley

无法解析符号Volley

本文介绍了Android Volley:无法解析符号Volley的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Volley从我的Android应用发送请求.

I want to use Volley to send requests from my Android app.

我已将其包含在build.gradle

I have included this in the build.gradle

dependencies {
    ...
   compile 'com.android.volley:volley:1.1.0'
}

我要使用:

requestQueue queue = Volley.newRequestQueue(this);

但是 requestQueue Volley 都无法解决.

我尝试过:

import com.android.volley;

但是它也说凌空无法解决.我已经完成了gradle同步.

But it also says that volley can't be resolved. I have done a gradle sync.

我还没有下载任何东西.我的理解是,将Volley添加到build.gradle代替实际下载库吗?

I have not downloaded anything. My understanding is that adding Volley to build.gradle takes the place of actually downloading the library?

推荐答案

正确的导入是 import com.android.volley.toolbox.Volley; (您可以检查代码此处)和必须是 Context 对象

The correct import is import com.android.volley.toolbox.Volley; (you can check the code here), and this has to be a Context object

这篇关于Android Volley:无法解析符号Volley的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 22:22