0

I wanted to use android gradle 5.5.1 which requires plugin version 3.4.0+ and I'm using plugin version 3.4.2 but when i try to make project i got 4 errors finding .pom and .jar files related to android.tools.build.gradle:3.4.2 I'm freaking and i really need help Thanks

these is the error

ERROR: Could not find com.android.tools.build:gradle:3.4.2. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.2/gradle-3.4.2.pom - https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.2/gradle-3.4.2.jar - https://jcenter.bintray.com/com/android/tools/build/gradle/3.4.2/gradle-3.4.2.pom - https://jcenter.bintray.com/com/android/tools/build/gradle/3.4.2/gradle-3.4.2.jar Required by: project : Open File

well i tried checking proxy in android studio and it was ok and actualy it download all gradle without any problem. i even used offline gradle but nothing changed ,and i don't know what to do anymore. in repositories i'm using google() ,so don't tell to use google()

here is my gradle-wrapper.properties

  • distributionUrl=https://services.gradle.org/distributions/gradle-5.5.1-all.zip *

and here's my build.gradle

  • dependencies { classpath 'com.android.tools.build:gradle:3.4.2' } *
Phantômaxx
  • 37,901
  • 21
  • 84
  • 115

2 Answers2

0

I ended up going in the build.gradle file, and adding google() right above jcenter(), like so.

buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.2'
    }
}

Once I did that, it stopped complaining. I found my answer in the following related question https://stackoverflow.com/a/44071571/11865353

0

Problem just solved,Because I live in Iran google doesn't allow my ip address to download these files so the solution was to change my ip dns address to something that googlw allows me to download Solved