Home > Net >  Flutter: Execution failed for task ':firebase_core:compileDebugJavaWithJavac'
Flutter: Execution failed for task ':firebase_core:compileDebugJavaWithJavac'

Time:09-28

I would like to ask some help regarding flutter.

    FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':firebase_core:compileDebugJavaWithJavac'.
> Could not create service of type DefaultGeneralCompileCaches using GradleScopeCompileServices.createGeneralCompileCaches().
   > 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

This is the error I am getting , I've never seen anything like this before. Other apps runs perfectly fine so there's no value in adding flutter doctor if you want to see some other code lemme know down in the comment.

CodePudding user response:

It seems like you are facing this issue when the android gradle build is running. As per the error output, this might get you back on track.

Try deleting the gradle cache located under

Windows:

C:\Users\user\.gradle

Mac/Linux:

/Users/prabhath/.gradle

folder and rerun the build. Hope this will solve your problem.

  • Related