Reputation: 1331
I created a new flutter project by VS Code. but I don't know why I am got this error on run
FAILURE: Build failed with an exception.
Could not resolve all artifacts for configuration ':classpath'. Could not find com.android.tools.build:gradle:3.6.2. Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.6.2/gradle-3.6.2.pom
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.6.2/gradle-3.6.2.jar
- https://jcenter.bintray.com/com/android/tools/build/gradle/3.6.2/gradle-3.6.2.pom
- https://jcenter.bintray.com/com/android/tools/build/gradle/3.6.2/gradle-3.6.2.jar
- https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/3.6.2/gradle-3.6.2.pom
- https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/3.6.2/gradle-3.6.2.jar
- https://maven.google.com/com/android/tools/build/gradle/3.6.2/gradle-3.6.2.pom
- https://maven.google.com/com/android/tools/build/gradle/3.6.2/gradle-3.6.2.jar
I searched a lot for the gradle problem but I can't see any solution
I installed Android studio, Android SDK 29, Flutter SDK and VS code plugins
Upvotes: 0
Views: 1899
Reputation: 855
I think you need to open the android folder with AndroidStudio and let Gradle to download android dependencies.
solution: if some countries have been banned maybe you need to use some VPN to download these dependencies. Hotspot shield is a good option cause it will change the IP address of your machine.
Upvotes: 2