gpt4 book ai didi

Error:Unexpected lock protocol found in lock file. Expected 3, found 0(错误:在锁定文件中发现意外的锁定协议。应为3,但已找到0)

转载 作者:bug小助手 更新时间:2023-10-25 18:55:57 28 4
gpt4 key购买 nike



After upgrading Android Studio to 1.3, I can't compile my project anymore. I am getting Unexpected lock protocol found in lock file. Expected 3, found 0.. I have tried with deleting my .gradle folder but that does not solve the problem. Anything else I can do?

在将Android Studio升级到1.3之后,我无法再编译我的项目。我在锁文件中发现意外的锁协议。应为3,但已找到0.我试图删除我的.gradle文件夹,但这并不能解决问题。还有什么我能做的吗?


更多回答

if you do anything steps, solution but not work, try delete all file on scripts folder, (.gradle/caches/<gradle-version-like-6.5>/scripts/)

如果您执行任何步骤、解决方案但不起作用,请尝试删除脚本文件夹(.gradle/caches//scripts/)上的所有文件

优秀答案推荐

I just solved this problem by simply Cleaning the Project and then Rebuilding it.

我只是通过简单地清理项目然后重建它来解决这个问题。



A Simple Solution

一个简单的解决方案


In my case just change distribution URL to latest

在我的例子中,只需将分发URL更改为最新


Go to gradle-wrapper.properties and change distributionUrl to latest

转到Gradle-wrapper.properties并将DistributionUrl更改为最新


distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip

And yet not solve this Error just do Clean Project Rebuild Project and Restart Android Studio.

然而,并不能解决这个错误,只需执行清理项目重建项目并重新启动Android Studio即可。



Computer froze while upgrading to Gradle 7.5.1 and I'm using buildSrc

升级到Gradle 7.5.1时计算机死机,我使用的是BuildSrc


In my case the corrupted lock file was inside buildSrc/.gradle, deleting this folder worked

在我的例子中,损坏的锁文件在BuildSrc/.gradle中,删除此文件夹可以



For People having trouble in React Native

对于那些在反应上有困难的人来说



  1. delete node modules

  2. delete c\users\[myusername]\.gradle\caches\the_gradle_Version_in_your_app

  3. Delete app from mobile

  4. run yarn or npm install

  5. Rerun app



It doesn't work none of above all.

最重要的是,它不起作用。




  1. Close the project.

  2. Remove from project list

  3. Re-import the project again. (If you have a whole source file of a project, you should clean previous project and extract the project again)

  4. Open intellij and click open the project.

  5. Select the extracted folder/ project folder.



It is done.

这件事已经完成了。


更多回答

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com