Findbugs fails with “java.io.IOException: No files to analyze could be opened”

血红的双手。 提交于 2019-12-10 09:59:38

问题


I run an Android Studio v2.1.3 and use ./gradlew build to detect errors in the Android project with the Findbags.

Recently an error started to come up:

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

There are enough disk space and RAM and beside that I don't see any particular reason for that error to occur. Please help to elaborate on this problem.


回答1:


If you use 3.2, please take a note that

classes = files("$project.buildDir/intermediates/classes")

should be

classes = files("$project.buildDir/intermediates/javac")



回答2:


I had the same problem after reorganizing my gradle files. This is the actual command:

gradlew --stacktrace assemble findbugs

Accidentally, I did this:

gradlew --stacktrace findbugs

With the first command no error arises, with later it shows "java.io.IOException: No files to analyze could be opened". To cut a long story short, maybe your files weren't compiled (yet).



来源:https://stackoverflow.com/questions/39851965/findbugs-fails-with-java-io-ioexception-no-files-to-analyze-could-be-opened

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!