Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throwing error cannot find symbol method getMainDiskStorageCache() on building #23

Open
csooraj opened this issue Sep 6, 2017 · 4 comments

Comments

@csooraj
Copy link

csooraj commented Sep 6, 2017

I followed the doc and added react-native-http-cache to my project, but on building the app I am getting the following error

/Users/sooraj/test/node_modules/react-native-http-cache/android/src/main/java/cn/reactnative/httpcache/HttpCacheModule.java

Error:(69, 62) error: cannot find symbol method getMainDiskStorageCache()
Error:(80, 62) error: cannot find symbol method getSmallImageDiskStorageCache()

I could not figure out this issue, could you please help to fix this.

I am using React Native version 0.47

@guopeng1994
Copy link

did you solve this problem?

@ismjt
Copy link

ismjt commented Oct 21, 2017

@csooraj try to fix these two line :

FileCache cache1 = ImagePipelineFactory.getInstance().getMainDiskStorageCache();

FileCache cache2 = ImagePipelineFactory.getInstance().getSmallImageDiskStorageCache();

solution:
【L69】FileCache cache1 = ImagePipelineFactory.getInstance().getMainFileCache();
【L80】FileCache cache2 = ImagePipelineFactory.getInstance().getSmallImageFileCache();

after edit, rebuild, it works for me , you can try it!

@SteffenC
Copy link

SteffenC commented Oct 27, 2017

I had same issue, and while @ismjt suggestion did work (it builds) I am now getting "undefined is not a function (evaluating CacheManager.clear())

@ismjt
Copy link

ismjt commented Oct 27, 2017

@SteffenC see here:

export async function clearCache(){

try this:
CacheManager.clearCache()

robwalkerco added a commit to papertrailio/react-native-http-cache that referenced this issue Nov 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants