我运行Android Studio v2.1.3,并使用./gradlew build
在Android项目中使用Findbags检测错误。
最近出现了一个错误:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':process:customFindbugs'.
> java.io.IOException: No files to analyze could be opened
有足够的磁盘空间和RAM,除此之外,我看不出发生该错误的任何特殊原因。请帮忙详细说明这个问题。
如果使用3.2,请注意
classes = files("$project.buildDir/intermediates/classes")
应为
classes = files("$project.buildDir/intermediates/javac")
我在重新组织gradle文件后遇到了同样的问题。这是实际的命令:
gradlew --stacktrace assemble findbugs
我不小心这样做了:
gradlew --stacktrace findbugs
使用第一个命令不会出现错误,使用后一个命令则显示"java.io. exe"。IOException: No files to analyze could be open "。长话短说,也许你的文件还没有编译(还没有)。