尝试开始在Flutter中对Dart进行编程。我想使用VSCode而不是Android Studio,但是当调试 session 开始时,出现以下问题。
我在此link中尝试了所有,例如删除了缓存,删除了锁定文件,杀死了cmd 中的PID任务,但没有任何效果。
但是,我可以在Android Studio中运行测试应用程序,但是我仍然想通过VSCode学习。如果您可以分享任何可能会有所帮助的建议,那就太好了:)
谢谢!
FAILURE: Build failed with an exception.
* What went wrong:
Gradle could not start your build.
> Could not create service of type FileHasher using BuildSessionServices.createFileHasher().
> 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 SDK:Windows 1.17.1(来自网站)
Android Studio:3.6.3
最佳答案
能够解决我自己的问题。显然,当我第一次在VSCode中同步演示应用程序时,它开始从gradle 5.62下载软件包,而6.4在我的机器上可用。然后我将设置和distributionUrl更改为该版本6.4。当我开始运行它时,问题中所述的错误浮出水面。
我所做的是:
关于android - Flutter VSCode:调试错误:无法使用BuildSessionServices.createFileHasher()创建FileHasher类型的服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61934794/