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

前端 未结 28 1521
灰色年华
灰色年华 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:44

    Go into your local file project and search for the ".gradle" folder

    Erase it and restart your IDE

    0 讨论(0)
  • 2020-12-01 01:44

    In android studio, Click on File and then Click "Invalidate Caches/Restart" and then confirm.

    0 讨论(0)
  • 2020-12-01 01:44

    None of the solutions here worked for me. For anyone who might run into my situation, here's what worked for me:

    In addition to the steps here, I also

    1. Deleted ~/.gradle/daemon/[GRADLE_VERSION]
    2. Deleted ~/.gradle/wrapper/dists/gradle-[GRADLE_VERSION]-all
    3. Deleted [PROJECT_PATH]/.gradle

    Restarted Android Studio

    0 讨论(0)
  • 2020-12-01 01:45

    You dont need to delete all your gradle files. Your just need to delete C:\Users\(your user name)\.gradle\daemon\(gradle version)\registry.bin.lock and you are done!

    0 讨论(0)
  • 2020-12-01 01:45

    I found a root cause of this problem for my case under Ubuntu 16.04. Both .gradle and project directories should have proper permissions. I've created this directories by myself and that's why they had more restricted permissions. I just let Android Studio to create both this directories bu itself and everything was working as expected.

    0 讨论(0)
  • 2020-12-01 01:47

    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.

    0 讨论(0)
提交回复
热议问题