我想寻求一些关于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
这就是我得到的错误,我以前从未见过这样的事情。其他应用程序运行得很好,所以如果你想在评论中看到一些我知道的其他代码,添加flutter doctor
是没有价值的。
发布于 2021-09-27 14:53:18
当android gradle构建正在运行时,您似乎面临着这个问题。根据错误输出,这可能会让您回到正轨。
尝试删除位于以下位置的gradle缓存
Windows:
C:\Users\user\.gradle
Mac/Linux:
/Users/prabhath/.gradle
文件夹并重新运行构建。希望这能解决你的问题。
https://stackoverflow.com/questions/69348565
复制相似问题