简体   繁体   中英

How to add volley in android

I am adding this in Gradle(Module app)

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在此处输入图片说明 please guide me.... 在此处输入图片说明

It's not volley its Gradle that is downloading the dependency, the 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

2- Slow Internet Connection

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.

EDIT: Try Invalidate and restart' if the problem is with android studio will might get solved.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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