Questions about Android compilation errors.

Asked 2 years ago, Updated 2 years ago, 26 views

Error:Execution failed for task ':app:compileDebugJavaWithJavac'.

Could not open local jar classpath snapshot write cache (C:\Search_Phone.gradle\2.10\tasks_app_compileDebugJavaWithJavac\localJarClasspathSnapshot). Unexpected lock protocol found in lock file. Expected 3, found 0.

During the production of BLE-related projects, I encountered this compilation errors No matter how many times I google it, there's no solution to it's... Please give me some advice!

android

2022-09-22 20:29

1 Answers

Is the project using a library file?

Please go to build.gradle and check if localJarClasspathSnapshot is in use When I looked at the error log, the jar file, which is the library, was locked in the file path It's a message that I can't open it.

If it's a library that you don't use, Clear the compile command in dependencies and run it.

The link below seems to be a similar error, so please refer to it.

http://stackoverflow.com/questions/27481981/android-studio-unexpected-lock-file-protocol


2022-09-22 20:29

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.