- npm install 使用
- react-native-scrollable-tab-view
- react-native-scrollable-tab-view
- undefined is not an object(evalu
- RN-常用第三方组件之react-native-scrollab
- react-native-scrollable-tab-view
- react-native-scrollable-tab-view
- 解决react-native-scrollable-tab-vi
- React-native-scrollable-tab-view
- react-native-scrollable-tab-view
问题描述:
react-native-scrollable-tab-view 目前最新版本1.0.0,在Android上有个问题:初次加载tab不显示TabView内容。
临时解决方案:
在工程中package.json替换版本: "react-native-scrollable-tab-view": "git+https://github.com/compojoom/react-native-scrollable-tab-view.git#fixes_android",
替换之后可能会遇到如下报错:Invariant Violation: ViewPagerAndroid has been removed from React Native. It can now be installed and imported from '@react-native-community/viewpager' instead。原因是rn当前版本已经删除了ViewPagerAndroid组件,替换成了react-native-community/viewpager
在node_modules目录下找到这个文件,将里面引用的ViewPagerAndroid删除

后期react-native-scrollable-tab-view版本更新,会彻底解决这个问题,这算是临时的解决方案。
网友评论