Could not find gradle flutter

Question

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.

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

Solution

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.