在build.gradle文件中任意位置加上如下配置: configurations.all { resolutionStrategy.cacheChangingModulesFor 1, 'minutes' }