fangwei716 / 30-days-of-react-native

30 days of React Native demos
6.83k stars 1.46k forks source link

undefined is not an object(evaluating 'ViewPropTypes.styles') #52

Open JackSteven opened 7 years ago

JackSteven commented 7 years ago

遇到第一个坑:

27022919-c61a9f56-4f82-11e7-9a49-9f3344a75f30

解决方法: node_modules\react-native-scrollable-tab-view\DefaultTabBar,ScrollableTabBar,index里面的ViewPropTypes改成了View.propTypes

遇到第二个坑: simulator screen shot 2017 6 28 3 31 13

解决方法: 将 Icon.TabBarItem 换成 TabBarIOS.Item,里面一些属性修改iconName换成icon,selectedIconName换成selectedIcon。

JackSteven commented 7 years ago

另外一个错误rctcamerarollmanager.getphotos,参考这个: https://stackoverflow.com/questions/33690208/undefined-ia-not-an-objectevaluating-rctcamerarollmanager-getphotos

CodingMonkeyzh commented 7 years ago

@JackSteven 这些错误是怎么导致的? 可以理解为 react-native-scrollable-tab-view 自身的 bug 么?

PengJuWang commented 7 years ago

这个demo我都没运行起来过

CodingMonkeyzh commented 7 years ago

@PengJuWang 升级下版本: npm install react-native-scrollable-tab-view@0.6.3

icyker commented 7 years ago

第一个坑遇到过,然后用react-native-git-upgrade 进行升级,出现很多冲突,更新修改后,能编译通过并安装。但是闪退,闪退,闪退!求助,怎么破啊

Amuxiaomu commented 7 years ago

我按照第一个修改了,可还是有问题这个 问题

MrTung commented 7 years ago

我的也是还报style的错,咋搞?

giantss commented 7 years ago

第一个修改错误是有问题的 出现了另一个错误

windyrain commented 7 years ago

https://github.com/skv-headless/react-native-scrollable-tab-view/issues/643

根据这个react-native插件库里的讨论。

downgrade react-native-scrollable-tab-view. Latest versions not compatible with react-native older than 0.44

接着我发现了Unrecognized font family ionicons的报错

这个是因为没有link到字体库导致的

react-native link react-native-vector-icons

当执行完后,如果使用的xcode,那么会得到 redefinition of rctloglevel 的报错

程序就可以完美运行了

2017-09-09 6 54 29
zer0err commented 7 years ago

summary of how I solved this problem:

  1. run npm install react-native-scrollable-tab-view@0.6.3
  2. run react-native link react-native-vector-icons
  3. run npm uninstall react-native-vector-icons
  4. delete "react-native-vector-icons": "XXX"" in file "package.json"
  5. run npm install react-native-vector-icons

thanks. @windyrain @CodingMonkeyzh

MilkBiscuit commented 7 years ago

summary of how I solved:

  1. run npm uninstall react-native-scrollable-tab-view

  2. run npm install react-native-scrollable-tab-view@0.6.0

  3. run npm uninstall react-native-vector-icons

  4. delete ( not necessary, it will be deleted automatically) "react-native-vector-icons": "XXX"" in file "package.json"

  5. run npm install react-native-vector-icons

  6. run react-native link react-native-vector-icons

  7. run react-native run-ios

Thanks @ericoda @windyrain

MrTung commented 7 years ago

楼上大神正解,thx

bigy6241 commented 7 years ago

楼上正解完美.....多谢

XuqingLiu commented 7 years ago

楼上正解,thx

feng-zhang0712 commented 6 years ago

@MilkBiscuit problem soved, thanks

oneMoreTime1357 commented 6 years ago

@MilkBiscuit Thanks problem soved

qikong233 commented 6 years ago

really help, thanks