ReactNative 常见问题

ReactNative 

1.#import <jschelpers/JavaScriptCore.h> file not exist

解决办法:

在pods subspecs里面添加'BatchedBridge'

pod 'React', :path => './node_modules/react-native', :subspecs => [


'Core',

'RCTText',

'RCTNetwork',

'RCTWebSocket', # 这个模块是用于调试功能的

'BatchedBridge',# 加上这个

# 在这里继续添加你所需要的模块

]

2.unable to resolve module 'react-navigation' from ....


解决方法:在package.json 的"dependencies"加入"react-navigation":"git+https://github.com/react-community/react-navigation.git#7edd9a7"

如下:

"dependencies": {

"react": "16.0.0-alpha.12",

"react-native": "0.45.1",

"react-navigation":"git+https://github.com/react-community/react-navigation.git#7edd9a7"

},

然后执行安装命令

yarn add react-navigation或者是npm install --save react-navigation

执行后的"dependencies"如下:

"dependencies": {

"react": "16.0.0-alpha.12",

"react-native": "0.45.1",

"react-navigation": "^1.0.0-beta.11"

},

如果集成在现有工程里 还需要pod install

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容