添加gradle依赖:org.apache.commons.io FileUtils.sizeOfDirectory(new File(path)); 转载于:https://www.cnblogs.com/sam-cheng/p/9012798.html