Fixed
Status Update
Comments
ej...@gmail.com <ej...@gmail.com> #3
Android Gradle Plugin: 8.7.1
Could you try the latest canary, AGP 8.8.0-alpha09
?
uc...@google.com <uc...@google.com>
je...@google.com <je...@google.com>
ga...@google.com <ga...@google.com> #4
I just updated to Android Gradle Plugin: 8.7.2 and the bug is fixed.
sp...@google.com <sp...@google.com>
sp...@google.com <sp...@google.com>
an...@google.com <an...@google.com> #5
I spoke too soon. The bug appears gone when I use a different computer, but that is only because the lint check is disabled on it. The computer with the false positive is a new cloning of my github project which apparently has the lint check enabled. The AGP 8.8.0-alpha09 plugin will not work on ladybug, and I'm too busy to switch to a canary build of android studio just to fix a false positive lint check, sorry.
Description
since it will return the size of the first directory instead of adding it to the total count.
private int getTotalLocalFileSize(File[] files) {
int count = 0;
for (File f : files) {
if (f.exists()) {
if (f.isDirectory()) {
return getTotalLocalFileSize(f.listFiles()) + 1;
} else if (f.isFile()) {
count += f.length();
}
}
}
return count;
}
Should be:
private int getTotalLocalFileSize(File[] files) {
int count = 0;
for (File f : files) {
if (f.exists()) {
if (f.isDirectory()) {
count += getTotalLocalFileSize(f.listFiles()) + 1;
} else if (f.isFile()) {
count += f.length();
}
}
}
return count;
}
Android Plugin Version: 3.1.0
com.android.tools.ddms:ddmlib:26.1.0