0

gives the error as 'could not find  com.android.tools.build:gradle:4.0.0

It is an eclipse adt based android application,facing the mentioned error while importing the project into android studio,please help.

error: 'could not find com.android.tools.build:gradle:4.0.0'

Ubaid Khan
  • 7
  • 1
  • 8
  • 1
    Does this answer your question? [Could not find com.android.tools.build:gradle:3.0.0-alpha1 in circle ci](https://stackoverflow.com/questions/44071080/could-not-find-com-android-tools-buildgradle3-0-0-alpha1-in-circle-ci) – Emmanuel Chebbi Jun 25 '20 at 08:32
  • @EmmanuelChebbi this is resulting in error:Minimum supported gradle version is 6.1.1 – Ubaid Khan Jun 25 '20 at 08:50
  • Well I guess your version of Android Studio requires at least Gradle 6.1.1 then. I'm not used to Gradle but have you tried replacing 4.0.0 by 6.1.1? I've also seen several topics that discuss this error on StackOverflow and which may help. – Emmanuel Chebbi Jun 25 '20 at 09:16

2 Answers2

0

Make sure 'Android SDK tools' is updated and whether you have installed the latest version of eclipse - 2020.06. Also sync project from gradle files. If you have done these already, tell me.

Peniel Dev
  • 33
  • 8
0

I don't think that com.android.tools.build:gradle:4.0.0 is available in jcenter. But it surely exists in maven.google.com. Please try adding google() repository:

  repositories {
    google()
    jcenter()
  }

Also you need to make sure that AndroidStudio version matches com.android.tools.build:gradle version. I.e. version 4.0.0 works best with Android Studio 4.0

Kuzneц
  • 707
  • 4
  • 7