xiekw2010 / react-native-gitfeed

Yet another Github client written with react-native.
1.72k stars 278 forks source link

`Image` has no propType for native prop `RCTImageView.overlayColor` of native type `number` #13

Open hyvenzhu opened 8 years ago

hyvenzhu commented 8 years ago

04-12 11:19:29.301 13803-15881/com.gitfeed E/ReactNativeJS: Image has no propType for native prop RCTImageView.overlayColor of native type number 04-12 11:19:29.331 13803-15882/com.gitfeed E/unknown:React: Exception in native call from JS com.facebook.react.bridge.NativeArgumentsParseException: RCTSourceCode.getScriptText got 4 arguments, expected 2 at com.facebook.react.bridge.BaseJavaModule$JavaMethod.invoke(BaseJavaModule.java:227) at com.facebook.react.bridge.NativeModuleRegistry$ModuleDefinition.call(NativeModuleRegistry.java:158) at com.facebook.react.bridge.NativeModuleRegistry.call(NativeModuleRegistry.java:58) at com.facebook.react.bridge.CatalystInstanceImpl$NativeModulesReactCallback.call(CatalystInstanceImpl.java:428) at com.facebook.react.bridge.queue.NativeRunnableDeprecated.run(Native Method) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31) at android.os.Looper.loop(Looper.java:136) at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:184) at java.lang.Thread.run(Thread.java:841) 04-12 11:19:29.361 13803-15881/com.gitfeed E/ReactNativeJS: Module AppRegistry is not a registered callable module. 04-12 11:19:29.561 13803-13803/com.gitfeed W/unknown:React: Calling JS function after bridge has been destroyed. 04-12 11:20:25.621 13803-13803/com.gitfeed A/libc: Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 13803 (com.gitfeed)

anguskwan commented 8 years ago

+1

vlike commented 8 years ago

同样是这个问题

ssx29984744 commented 8 years ago

原因: 项目根目录里的package.json里指定了react-native-vector-icons的版本兼容1.1.1,即1.1.1>=version<2.0.0。 所以npm install自动下载的是1.n.n里面最新的版本1.3.4。但是react-native-vector-icons这个1.3.4版本并不兼容gitfeed项目,猜测是作者开始写gitfeed这个项目时,react-native-vector-icons还没有更新到1.3.4版本。所以手动安装react-native-vector-icons的1.1.1版本即可: ①cd到项目根目录 命令行:npm install react-native-vector-icons@1.1.1。 ②react-native run-android ========分割线=========== 或者 就要使用react-native-vector-icons的1.3.4版本,那只能如下这么去做了: 猜测react-native-vector-icons的1.3.4+版本是基于react-native的0.20+版本来做的,所以: 升级一下react-native的版本: ①修改项目根目录下的package.json里的配置信息"react-native": "0.19.0"为"react-native": "0.20.0",保存。 ②cd到项目的根目录,命令行:npm install ③搜索全项目的lightGray,将lightGray修改为lightgray。 ④react-native run-android 修改完毕不知道式样什么的对不对,不过能跑起来。

ghost commented 8 years ago

Thanks to a comment from @ssx29984744 I figured out I had to pin react-native-vector-icons to 1.2.x with react-native@0.19 to overcome this error. 谢谢