美文网首页
It is currently in use by anothe

It is currently in use by anothe

作者: 雪狼老巫 | 来源:发表于2021-07-01 14:03 被阅读0次

在使用gradle编译Android工程的时候,报如下错误:

It is currently in use by another Gradle instance

尝试解决方法如下:

1、删除工程中的.gradle和.idea目录后重新编译

2、Andorid studio File->invalidate caches/Restart

3、ps -ef | grep java 和ps -ef | grep gradle 并杀掉找到的线程

以上三种方法单个使用或者组合使用,有时能成功,有时不能成功。接下来的方法亲测会成功

1、terminal中执行命令 find ~/.gradle -type f -name "*.lock" | while read f; do rm $f; done

2、build->clean project

相关文章

网友评论

      本文标题:It is currently in use by anothe

      本文链接:https://www.haomeiwen.com/subject/eapjultx.html