错误消息:
没有要分析的文件
我的findbugs配置如下:
tasks.create([ "type" : FindBugs, "dependsOn" : "assemble", "group": "verification", "name": "findbugs"]) {
classes = files("$projectDir.absolutePath/build/intermediates/classes")
source = fileTree('src/main/java')
classpath = files()
}
答案 0 :(得分:8)
在AGP 3.2中,类路径似乎已从build/intermediates/classes
更改为build/intermediates/javac
。
答案 1 :(得分:1)
task findbugs(type: FindBugs) {
ignoreFailures = true
classes = files("${project.rootDir}/app/build/intermediates/javac",
"${project.rootDir}/database/build/intermediates/javac",
"${project.rootDir}/dataprovider/build/intermediates/javac")
source = fileTree('app/src/main/java/')
classpath = files()
reports {
html.enabled = true
xml.enabled = false
}
}
答案 2 :(得分:0)
只需从classes = fileTree("$project.buildDir/intermediates/classes/dev/debug/com/android"
更改文件findbugs.gradle中的类路径
到classes = fileTree("$project.buildDir/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android"
。