Josh Kahane
Josh Kahane

Reputation: 17160

Flutter & VSCode: Gradle Build Error

I have recently setup VSCode and Flutter on my Mac and created a new project.

I can build it to the iOS Simulator and devices, however when attempting to run on the Android simulator I get the following build error when it fails to run:

Launching lib/main.dart on Android SDK built for x86 in debug mode...
Exit code 1 from: /Users/Username/Desktop/Dart:Flutter Test/test3/android/gradlew -v:
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
Exited (sigterm)

In case it is worth noting I have Android Studio 3.0 installed (previous to setting this up).

Upvotes: 2

Views: 2386

Answers (2)

Abhijith Kumar
Abhijith Kumar

Reputation: 11

I faced the same issue. I noticed that the folder which contained my flutter project had space in its name. So I renamed and removed the space and my issue got resolved.

Upvotes: 1

Josh Kahane
Josh Kahane

Reputation: 17160

I resolved my issue by removing a forward slash '/' from a folder name my project was kept in. That / is translated into a ':' and it doesn't like it!

Upvotes: 2

Related Questions