任务 ':share:compileDebugJavaWithJavac' 执行失败

Execution failed for task ':share:compileDebugJavaWithJavac'

我在我的项目中使用 share: ^0.6.4+3,但是当我在我的模拟器上启动我的项目时,我遇到了:

Execution failed for task ':share:compileDebugJavaWithJavac'.
> java.io.FileNotFoundException: /home/chinkysight/Desktop/Pecha/build/share/intermediates/annotation_processor_list/debug/annotationProcessors.json (No such file or directory)

我尝试降级版本,但没有帮助:(

java.io.FileNotFoundException: /home/chinkysight/Desktop/Pecha/build/share/intermediates/annotation_processor_list/debug/annotationProcessors.json (No such file or directory)

您可以删除 .gradle 文件夹并再次重建项目,或者您可以在 gradle-wrapper.properties

中更新 gradle 版本
 distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip

将gradle版本的值改为最新版本