undefined is not an object (evaluating 'RNFetchBlob.DocumentDir')或 C..._react-native 获取file或blob类型的流,怎么获取?">
赞
踩
请求‘流’数据
运行环境
"react": "^16.4.1", "react-native": "^0.55.4", node -v v7.8.0
1、关于网络请求的插件react-native-fetch-blob
2、集成插件遇到的问题
2.1 iOS ==> undefined is not an object (evaluating 'RNFetchBlob.DocumentDir')
或 Cannot read property 'DocumentDir' of undefined
link完之后在ios工程目录Library下没找到。。
手动添加
1、 addFilesTo 选择node_modules->react-native-fetch-blob->ios->RNFetchBlob.xcodeproj
2、target->Linked Frameworks And Librarys 点击“+” 找到libRNFetchBlob
完成后clean 、run
2.2 android ==> undefined is not an object (evaluating 'RNFetchBlob.DocumentDir')
解决办法:检查react-native link是否真正有效果
a、在settings.gradle中添加
include ':react-native-fetch-blob'
project(':react-native-fetch-blob').projectDir = new File(rootProject.projectDir,
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。