react-native打包报错:react-native-http-cache:compileReleaseJavaWithJavac FAILED
报错截图:
解决方法:
在源码中 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();
如图所示: