Cannot lock Java compile cache as it has already been locked by this process.

一、前言:

今天在项目中突然遇到这个Bug,很是奇怪啊。

错误: Cannot lock Java compile cache (D:\develop\work\teagoandroid.gradle\5.4.1\javaCompile) as it has already been locked by this process.

在这里插入图片描述

二、解决:

1. 方式1:Cannot lock Java compile cache as it has already been locked by this process._第1张图片Cannot lock Java compile cache as it has already been locked by this process._第2张图片

操作完成后还会报以下错误

Corrupted DataBlock 32296 found in cache ‘D:\develop\work\teagoandroid.gradle\5.4.1\javaCompile\taskHistory.bin’.
看方式二来解决啊。

2. 方式二:

以上操作还是没有解决我的问题,后来发现引入的微信SDK造成的。

//微信登录
//implementation ‘com.tencent.mm.opensdk:wechat-sdk-android-with-mta:5.3.1’

不要引入这个包,换一个别的版本(这个版本有Bug),就好了。

至此,我的问题得到了解决。

你可能感兴趣的:(Android)