简体   繁体   English

如何在android中添加凌空抽射

[英]How to add volley in android

I am adding this in Gradle(Module app)我在 Gradle(模块应用程序)中添加了这个

implementation 'com.android.volley:volley:1.0.0'

and press "sync now" and it starts loading after a long time of loading it shows an error that says cannot resolve volley and then I changed its version to 1.1.1 and press sync now and after two hours of loading it shows并按“立即同步”,它在加载很长时间后开始加载它显示一个错误,说无法解决截击,然后我将其版本更改为 1.1.1 并立即按同步,加载两个小时后它显示在此处输入图片说明 please guide me....请指导我.... 在此处输入图片说明

It's not volley its Gradle that is downloading the dependency, the Gradle download **PackageName**并不是它的 Gradle 正在下载依赖项,而是Gradle download **PackageName**

the possible reason could be:可能的原因可能是:

1- Availability of read/write Permissions if you are using Linux Distro if its the problem then use sudo chmod 7777 your_file_name or you can use sudo chmod 7777 * to change the permission of every file in the folder or drive 1- 读/写权限的可用性,如果您使用的是 Linux 发行版,如果出现问题,则使用sudo chmod 7777 your_file_name或者您可以使用sudo chmod 7777 *更改文件夹或驱动器中每个文件的权限

2- Slow Internet Connection 2- 互联网连接缓慢

solution: try using SpeedTest if the internet speed is slower then the normal then its the problem otherwise, check the permission status on the drive and follow the first solution.解决方案:如果互联网速度比正常速度慢,请尝试使用SpeedTest ,否则问题出在,请检查驱动器上的权限状态并按照第一个解决方案进行操作。

EDIT: Try Invalidate and restart' if the problem is with android studio will might get solved.编辑:如果问题出在 android studio 上,请尝试Invalidate and restart'可能会得到解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM