Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Run with --stacktrace option to get the stack trace

I keep getting this error and i don't seem to find any help online. I am new to flutter and android studio. any help is well appreciated

  • FAILURE: Build failed with an exception.

    Where: Build file 'C:\Android\Android Studios\cravings\android\app\build.gradle' line: 26

  • What went wrong: A problem occurred evaluating project ':app'.

    Could not open dsl remapped class cache for eq9b73nqpstq0kplnrtticwqc (C:\Users\October Price.gradle\caches\5.6.2\scripts-remapped\flutter_f2f86ofj12jp9hosmvp06kahh\eq9b73nqpstq0kplnrtticwqc\dsl9d9bdfa13168004751655a79e56a065e). Unexpected lock protocol found in lock file. Expected 3, found 0.

  • 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 1s Finished with error: Gradle task assembleDebug failed with exit code

like image 435
Daniel Separe Avatar asked Feb 04 '23 16:02

Daniel Separe


2 Answers

You can try running the assembleDebug Gradle task manually.

cd android
./gradlew assembleDebug --stacktrace

But there could be something wrong with your configuration. Run flutter doctor -v and see if everything is setup correctly.

Otherwise you can try deleting the Gradle cache folder which seem to bet at C:\Users\October Price.gradle\caches.

like image 135
kuhnroyal Avatar answered Feb 06 '23 15:02

kuhnroyal


You can set your android compiler to always run with --stacktrace modifier.

  • Head to Settings > Build, Execution, Deployment > Compiler
  • Add --debug or --info or --stacktrace (Or combination of them) to the Command line options

enter image description here

In your case clearing C:\Users\October Price\.gradle\caches folder and re-syncing the project might help.

like image 40
Mahdi-Malv Avatar answered Feb 06 '23 14:02

Mahdi-Malv