Solution 1 :
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
Problem :
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:
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.pom
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.jar
- https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.pom
- https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.jar
Required by:
project :
Open File )))
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 ?
Comments
Comment posted by this
Have you tried
Comment posted by ibra66
Yes I already have google() repo in my build.gradle file and the problem is still appear.