Having this error whenever running a project in Visual Studio Code.
CodePudding user response:
here's very lightweight solution with steps:
Ctrl Alt Shift S or File->Project Structure
Select Project from left panel
Now check your Gradle Version at right panel
In my case my Gradle Version is 3.3
Navigate C:\Users\ashish.gradle\caches and delete your Gradle
Version - 3.3 named folder.Now restart or open your project again from workspace.
CodePudding user response:
Solution I figured out myself:
Go to this location: " C:\Users\yourUserName "
Delete the folder ".gradle" completely from this directory.
Run the code again in VS Code by "flutter run" or "F5", then it will recreate the ".gradle" folder in the same directory and fix the issue.
Now you can run your code easily in VS Code and use your emulators.
Problem Solved, Enjoy!