0
votes

I installed android studio 3.5 and gradle 5.4.1 installed automatically and successfully, but after that sync fails and a problem appears every time :

((( ERROR: Could not find com.android.tools.build:gradle:3.5.0. Searched in the following locations:

and my build.gradle file is like this : build.gradle file

Noting that I tried many android studio versions and same problem appears.

Any solutions please ?

1
Have you tried this worked for me sometime back. - m'hd semps
Yes I already have google() repo in my build.gradle file and the problem is still appear. - ibra66

1 Answers

0
votes

This normally rises when your internet connection is unstable when studio is downloading gradle I would suggest:

  • uninstall studio and its config files in appdata dir files (dont delete Androidstuidoprojects)
  • restart your pc
  • install studio when you are sure you have a stable connection

NB: once gradle download fails midway you have to manually delete it in C:/Users/pc-name/gradle so make sure it works the first time