构建具有库依赖性的项目可防止清除

时间:2018-01-23 15:11:47

标签: android gradle android-gradle android-gradle-3.0

Windows 10,gradle 4.1,构建工具27.0.2,gradle plugin 3.0.1。

我有一个应用app,依赖于android-faq-bot

如果我在成功构建后./gradlew.bat clean,我会收到以下错误:

$ gradlew.bat clean app:compileJenkinsDebugSources
app: 'annotationProcessor' dependencies won't be recognized as kapt annotation processors. Please change the configuration name to 'kapt' for these artifacts: 'com.android.databinding:compiler:3.0.1'.
Configuration 'testCompile' in project ':android-faq-bot:app' is deprecated. Use 'testImplementation' instead.
:clean
:android-faq-bot:clean UP-TO-DATE
:app:clean
:android-faq-bot:app:clean FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':android-faq-bot:app:clean'.
> Unable to delete file: C:\Users\onion\boeg\android-faq-bot\app\build\intermediates\intermediate-jars\debug\classes.jar

正在运行

handle C:\Users\onion\boeg\android-faq-bot\app\build\intermediates\intermediate-jars\debug\classes.jar

Nthandle v4.1 - Handle viewer
Copyright (C) 1997-2016 Mark Russinovich
Sysinternals - www.sysinternals.com

java.exe           pid: 2160   type: File           F38: C:\Users\onion\boeg\android-faq-bot\app\build\intermediates\intermediate-jars\debug\classes.jar

我尝试停用所有插件,禁用dexInProcess。 不行,唯一的选择是杀死gradle守护进程。 我尝试附加https://github.com/kohsuke/file-leak-detector javaagent以查看文件的打开位置,但我无法让它在Windows上运行。 我还尝试从jconsole强制GC,希望不可达的文件最终确定并释放FD。但没有。

有什么建议吗?

0 个答案:

没有答案