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

时间:2020-05-25 05:10:30

标签: flutter flutter-dependencies

我在项目中使用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)

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

1 个答案:

答案 0 :(得分:0)

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版本的值更改为最新版本