[英]Multi project gradle build - java.io.IOException: Unable to delete file
I have a multi project build 我有一个多项目构建
main-module 主模块
-> api -> API
-> pets ->宠物
-> gateway ->网关
Execution failed for task ':api:jar'. 任务':api:jar'的执行失败。
java.io.IOException: Unable to delete file: \\main-module\\api\\build\\libs\\api.jar java.io.IOException:无法删除文件:\\ main-module \\ api \\ build \\ libs \\ api.jar
How do I resolve this? 我该如何解决? Thanks. 谢谢。
It seems there's something wrong with your build. 您的构建似乎有问题。 The api:jar
task should be considered as UP-TO-DATE at step 4 (since step 3 has already built it and nothing has changed) but it seems that it's trying to build the jar again. api:jar
任务应该在第4步视为UP-TO-DATE(因为第3步已经构建了它,并且没有任何改变),但似乎它正在尝试再次构建jar。 Most likely cause is a task input (a file) has changed 最可能的原因是任务输入(文件)已更改
I'd guess that some of your task inputs/outputs are incorrect. 我猜想您的某些任务输入/输出不正确。 Or maybe you generate a file with the current date/time in it as part of your build process?. 还是在生成过程中生成了包含当前日期/时间的文件? You can try running gradle with --info
to see why api:jar
task is not UP-TO-DATE for step 4 您可以尝试使用--info
运行gradle,以查看步骤4的api:jar
任务为何不最新
See up to date checks 查看最新检查
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.