30-days-of-react-native icon indicating copy to clipboard operation
30-days-of-react-native copied to clipboard

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

Open JackSteven opened this issue 7 years ago • 17 comments

遇到第一个坑: 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 avatar Jun 28 '17 07:06 JackSteven

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

JackSteven avatar Jun 29 '17 06:06 JackSteven

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

CodingMonkeyzh avatar Jul 04 '17 10:07 CodingMonkeyzh

这个demo我都没运行起来过

PengJuWang avatar Jul 04 '17 10:07 PengJuWang

@PengJuWang 升级下版本: npm install [email protected]

CodingMonkeyzh avatar Jul 04 '17 10:07 CodingMonkeyzh

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

icyker avatar Aug 08 '17 11:08 icyker

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

Amuxiaomu avatar Aug 14 '17 05:08 Amuxiaomu

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

MrTung avatar Aug 21 '17 02:08 MrTung

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

giantss avatar Aug 22 '17 11:08 giantss

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

  • 将依赖中的react-native-scrollable-tab-view版本指定为0.6.0
  • 重新安装该依赖项

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

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

react-native link react-native-vector-icons

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

  • npm uninstall react-native-vector-icons
  • 并把package.json中的"react-native-vector-icons": "XXX",删掉
  • npm install react-native-vector-icons

程序就可以完美运行了

2017-09-09 6 54 29

windyrain avatar Sep 09 '17 10:09 windyrain

summary of how I solved this problem:

  1. run npm install [email protected]
  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

zer0err avatar Sep 11 '17 08:09 zer0err

summary of how I solved:

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

  2. run npm install [email protected]

  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

MilkBiscuit avatar Sep 12 '17 08:09 MilkBiscuit

楼上大神正解,thx

MrTung avatar Sep 12 '17 08:09 MrTung

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

bigy6241 avatar Sep 21 '17 09:09 bigy6241

楼上正解,thx

XuqingLiu avatar Oct 26 '17 04:10 XuqingLiu

@MilkBiscuit problem soved, thanks

feng-zhang0712 avatar Nov 28 '17 02:11 feng-zhang0712

@MilkBiscuit Thanks problem soved

oneMoreTime1357 avatar Nov 28 '17 04:11 oneMoreTime1357

really help, thanks

qikong233 avatar Jan 29 '18 10:01 qikong233