Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 308
Mykola Avatar asked Oct 04 '16 12:10

Mykola


2 Answers

If you use 3.2, please take a note that

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

should be

classes = files("$project.buildDir/intermediates/javac")
like image 130
Mladen Rakonjac Avatar answered Oct 13 '22 22:10

Mladen Rakonjac


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).

like image 1
A.D. Avatar answered Oct 13 '22 21:10

A.D.