Flutter Error: Could not resolve all files for configuration ':classpath'. > Could not find com.android.tools.build:gradle:7.4.2

Viewed 2142

What went wrong: A problem occurred configuring root project 'android'.

Could not resolve all files for configuration ':classpath'. Could not find com.android.tools.build:gradle:7.4.2. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.4.2/gradle-7.4.2.pom - https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/7.4.2/gradle-7.4.2.pom Required by: project :

  • Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

I am getting this error when trying to run my project

1 Answers

check gradle version in build.gradle file. Downgrade the version or upgrade once.

Related