Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

经常编译失败提示module的class.jar无法删除 #5

Open
leach-chen opened this issue Mar 8, 2019 · 4 comments
Open

经常编译失败提示module的class.jar无法删除 #5

leach-chen opened this issue Mar 8, 2019 · 4 comments

Comments

@leach-chen
Copy link

这个方式经常出现

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':Provider:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug'.

java.lang.RuntimeException: java.io.IOException: Failed to delete \build\intermediates\intermediate-jars\debug\classes.jar

这个文件无法删除,被java.exe占用了,这个有没有什么方法解决?经常要手动就接触占用

@guofudong
Copy link
Owner

这个方式经常出现

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':Provider:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug'.

java.lang.RuntimeException: java.io.IOException: Failed to delete \build\intermediates\intermediate-jars\debug\classes.jar

这个文件无法删除,被java.exe占用了,这个有没有什么方法解决?经常要手动就接触占用

这个问题是由“kotlin-android”插件引起的,目前的解决办法就是在打包的时候自动执行clean命令,这样就不用手动了。代码已上传。

@leach-chen
Copy link
Author

好的,谢谢

@wangcc0909
Copy link

在gradle5.1.1上不能执行clean.execute(),该如何解决?

@guofudong
Copy link
Owner

在gradle5.1.1上不能执行clean.execute(),该如何解决?

taskClean.onlyIf {
true
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants