1.导入依赖 并添加 网络权限(我就不粘贴网络权限了)
implementation 'com.facebook.fresco:fresco:1.12.0'
2.在Application中初始化
ImagePipelineConfig pipelineConfig = ImagePipelineConfig.newBuilder(this)
.setMainDiskCacheConfig(DiskCacheConfig.newBuilder(this)
.setBaseDirectoryPath(Environment.getDownloadCacheDirectory())//设置外部SD卡缓存目录文件
.setBaseDirectoryName