I'm getting this error about gradle in my flutter project, can you help me?

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not find com.android.tools.build:gradle:8.10.2.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/8.10.2/gradle-8.10.2.pom
       - https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/8.10.2/gradle-8.10.2.pom
     Required by:
         root 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.
> Get more help at https://help.gradle.org.

You confuse Gradle version with Android Gradle Plugin version.
Google unluckily chose to name their AGP artifact google but its version is totally independent from the Gradle version.
You try to use 8.10.2 as AGP version, but no such version exists, only Gradle version 8.10.2 exists.