報錯截圖:
解決方法:
在源碼中 node_modules>>react-native-http-cache>>android>>src>>main>>java>>cn>>reactnative>>httpcache>>HttpCacheModule.java
在getImageCacheSize()方法裏面 替換這兩個方法
//FileCache cache1 = ImagePipelineFactory.getInstance().getMainDiskStorageCache();
FileCache cache1 = ImagePipelineFactory.getInstance().getMainFileCache();
//FileCache cache2 = ImagePipelineFactory.getInstance().getSmallImageDiskStorageCache();
FileCache cache2 = ImagePipelineFactory.getInstance().getSmallImageFileCache();
如圖所示: