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

RN 0.43 不支持 #16

Open
sunny20131314 opened this issue Apr 18, 2017 · 3 comments
Open

RN 0.43 不支持 #16

sunny20131314 opened this issue Apr 18, 2017 · 3 comments

Comments

@sunny20131314
Copy link

无效使用: ios 报变量重复声明等错
node_modules/react-native-http-cache/ios/RCTHttpCache/RCTHttpCache.m:12:
../../react-native/React/Base/RCTBridge.h:66:1: error: duplicate interface definition for class 'RCTBridge'

android: 找不到符号

node_modules/react-native-http-cache/android/src/main/java/cn/reactnative/httpcache/HttpCacheModule.java:69: 错误: 找不到符号
FileCache cache1 = ImagePipelineFactory.getInstance().getMainDiskStorageCache();
^
符号: 方法 getMainDiskStorageCache()
位置: 类 ImagePipelineFactory
/node_modules/react-native-http-cache/android/src/main/java/cn/reactnative/httpcache/HttpCacheModule.java:80: 错误: 找不到符号
FileCache cache2 = ImagePipelineFactory.getInstance().getSmallImageDiskStorageCache();
^
符号: 方法 getSmallImageDiskStorageCache()
位置: 类 ImagePipelineFactory

"react": "16.0.0-alpha.6",
"react-native": "0.43.3",
"react-native-http-cache": "^0.2.0",
@sunny20131314
Copy link
Author

ios: /node_modules/react-native-http-cache/ios/RCTHttpCache/RCTHttpCache.m 下做如下更改
#import "RCTImageLoader.h" -> #import "React/RCTImageLoader.h"
#import "RCTBridge.h" -> #import "React/RCTBridge.h"

android: /node_modules/react-native-http-cache/android/src/main/java/cn/reactnative/httpcache/HttpCacheModule.java 下做如下更改
getMainDiskStorageCache 替换为-> getMainFileCache
getSmallImageDiskStorageCache 替换为-> getSmallImageFileCache
参考自:https://www.fresco-cn.org/javadoc/reference/com/facebook/imagepipeline/core/ImagePipelineFactory.html

ios 在模拟器上可用,android 真机可用,麻烦测试更新下

@America-first-melon
Copy link

666

@chuanfengH
Copy link

I also used it in 0.43 , but getCacheSize = 0 ?
I have used react-native-img-cache & react-native-storage
so i want to ask a question , how could I get cacheSize ?

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

3 participants