showing this Gradle error when trying to run flutter project

682

The gradle plugin has different versions in project level build.grade and gradle-wrapper.properties Here is the official documentation about this

Share:
682
mishalhaneef
Author by

mishalhaneef

I'm Flutter Developer

Updated on January 04, 2023

Comments

  • mishalhaneef
    mishalhaneef about 1 year

    I updated the Gradle from android studio. and when I try to run the project in vs code (Yes I already changed inside the build Gradle file too) showing this error.

     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:7.4.1.
         Searched in the following locations:
           - https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.4.1/gradle-7.4.1.pom
           - https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/7.4.1/gradle-7.4.1.pom
         Required by:
             project :
    

    how can I fix this?

    • griffins
      griffins about 2 years
      does this answer your question stackoverflow.com/questions/71508591/…
    • mishalhaneef
      mishalhaneef about 2 years
      @griffins no its not, the answer didn't even fixed for him (who asked question) :(
    • griffins
      griffins about 2 years
      well have you tried the suggestion download gradle manually and install it?
    • Junaid Khalid
      Junaid Khalid about 2 years
      developer.android.com/studio/releases/gradle-plugin#groovy Check this and tell us if this helps
    • Junaid Khalid
      Junaid Khalid about 2 years
      It isaying that for 7.3+ the classpath plugin is 7.2