1

I'm using VS code without Android studio in Ubuntu 20.04. While running the first app in flutter in debugging mode in an real device produced this error given below. I also tried to change my JDK version but it didn't worked.

Launching lib/main.dart on Nokia 6 1 Plus in debug mode...

FAILURE: Build failed with an exception.                                

* What went wrong:                                                      
Could not initialize class org.codehaus.groovy.runtime.InvokerHelper    

* Try:                                                                  
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org                              

BUILD FAILED in 12s                                                     
Running Gradle task 'assembleDebug'...                                  
Running Gradle task 'assembleDebug'... Done                        18.3s
Exception: Gradle task assembleDebug failed with exit code 1

Please suggest a solution!

1 Answer 1

1

Your gradle sync has failed for some reason. Do this

  1. File > Open
  2. Navigate to your project
  3. You will see an android folder there open that as project in a new window
  4. Check the gradle sync issues and resolve those
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.