I am working with Android Studio 2.1 and Ubunto 16 LTS. I have installed Java correctly. There is no way I can compile any project since every time I do I receive the following error:
Unexpected lock protocol found in lock file. Expected 3, found 0. Information: BUILD FAILED
I have already entered the environment variables, reinstalling Android Studio and nothing.
Here is the complete log:
Information: Gradle tasks [: app: clean,: app: generateDebugSources,: app: generateDebugAndroidTestSources,: app: mockableAndroidJar,: app: prepareDebugUnitTestDependencies,: app: assembleDebug] : app: clean : app: preBuild UP-TO-DATE : app: preDebugBuild UP-TO-DATE : app: checkDebugManifest : app: preReleaseBuild UP-TO-DATE : app: prepareComAndroidSupportAnimatedVectorDrawable2410Library : app: prepareComAndroidSupportAppcompatV72410Library : app: prepareComAndroidSupportSupportV42410Library : app: prepareComAndroidSupportSupportVectorDrawable2410Library : app: prepareDebugDependencies : app: compileDebugAidl : app: compileDebugRenderscript : app: generateDebugBuildConfig : app: mergeDebugShaders : app: compileDebugShaders : app: generateDebugAssets : app: mergeDebugAssets : app: generateDebugResValues UP-TO-DATE : app: generateDebugResources : app: mergeDebugResources : app: processDebugManifest : app: processDebugResources : app: generateDebugSources : app: preDebugAndroidTestBuild UP-TO-DATE : app: prepareDebugAndroidTestDependencies : app: compileDebugAndroidTestAidl : app: processDebugAndroidTestManifest : app: compileDebugAndroidTestRenderscript : app: generateDebugAndroidTestBuildConfig : app: mergeDebugAndroidTestShaders : app: compileDebugAndroidTestShaders : app: generateDebugAndroidTestAssets : app: mergeDebugAndroidTestAssets : app: generateDebugAndroidTestResValues UP-TO-DATE : app: generateDebugAndroidTestResources : app: mergeDebugAndroidTestResources : app: processDebugAndroidTestResources : app: generateDebugAndroidTestSources : app: mockableAndroidJar UP-TO-DATE : app: preDebugUnitTestBuild UP-TO-DATE : app: prepareDebugUnitTestDependencies : app: incrementalDebugJavaCompilationSafeguard : app: compileDebugJavaWithJavac : app: compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.). : app: compileDebugJavaWithJavac FAILED Error: Execution failed for task ': app: compileDebugJavaWithJavac'.
Unexpected lock protocol found in lock file. Expected 3, found 0. Information: BUILD FAILED Information: Total time: 4.617 secs Information: 1 error Information: 0 warnings Information: See complete output in console
I appreciate your cooperation.