背景 我正在使用Fastlane's screengrab自动拍摄我的安卓应用程序的屏幕截图。但是,Screengrab.screenshot()的默认行为会将时间戳添加到文件名中。这是不可取的,甚至是出乎意料的。 This issue on Github建议扩展ScreenshotCallback以删除文件名中的时间戳。我发现默认行为是在FileWritingScreenshotCallback中实现的,因此决定对其进行扩展并覆盖getScreenshotFile() class ScreenshotCallback extends FileWritingScreenshotCal