Error:Unexpected lock protocol found in lock file. Expected 3, found 0

前端 未结 28 1686
灰色年华
灰色年华 2020-12-01 01:18

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 ha

28条回答
  •  借酒劲吻你
    2020-12-01 01:38

    Deleting cache folder take long time because it have more than 200k files which is more than 3GB. There is quick view as Ashish mentioned.

    I also faced this error in only one app.

    Go through the step.

    1. In you project open gradle-wrapper.properties file. Which is located in Gradle Script in Android structure. As shown in below image.

    2. In that file check distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip. Here gradle version is 4.6.

    3.So all cache for that project will be store in your C:\Users\Your PC Name or User Name\.gradle\caches\4.6. As shown in below image.

    1. Close your android studio and delete the 4.6 folder. After deletion open android studio.

    That's all. It took mine 6 hours to figure out and deleting cache folder. So I decide to post this answer. So people will not waste same time.

提交回复
热议问题