Windows 10,gradle 4.1,构建工具 27.0.2,gradle 插件 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。但不是。
有什么建议么?