react-native-chat-demo icon indicating copy to clipboard operation
react-native-chat-demo copied to clipboard

正确安装以及link后,引入NIM模块,调用NIM.login 却说 undefined

Open HenryZl opened this issue 9 years ago • 3 comments

如题, 具体提示:

Cannot read property 'login' of undefined Function.login index.android.bundle?platform=android&dev=true&hot=true&minify=false:85319:31 Login.onLoginButtonPress index.android.bundle?platform=android&dev=true&hot=true&minify=false:56469:44 Login.proxiedMethod index.android.bundle?platform=android&dev=true&hot=true&minify=false:6483:30 Object.onPress index.android.bundle?platform=android&dev=true&hot=true&minify=false:56737:44 ProxyComponent.touchableHandlePress index.android.bundle?platform=android&dev=true&hot=true&minify=false:37617:38 ProxyComponent.proxiedMethod [as touchableHandlePress] index.android.bundle?platform=android&dev=true&hot=true&minify=false:6483:30 ProxyComponent._performSideEffectsForTransition index.android.bundle?platform=android&dev=true&hot=true&minify=false:27132:14 ProxyComponent.proxiedMethod [as _performSideEffectsForTransition] index.android.bundle?platform=android&dev=true&hot=true&minify=false:6483:30 ProxyComponent._receiveSignal index.android.bundle?platform=android&dev=true&hot=true&minify=false:27069:12 ProxyComponent.proxiedMethod [as _receiveSignal] index.android.bundle?platform=android&dev=true&hot=true&minify=false:6483:30

HenryZl avatar Jun 21 '17 05:06 HenryZl

对引入的NIM 进行处理 对他进行new操作,然后就可以正常使用。 var nim_process = new NIM() NIM.login ……

没有深究原因,或许是因为RN版本原因?不得而知。

HenryZl avatar Jun 21 '17 08:06 HenryZl

在更新 react-native 0.44.0 之后,还是会产生相同的错误…

HenryZl avatar Jun 22 '17 09:06 HenryZl

没有link成功

hzlgit avatar Jun 24 '17 09:06 hzlgit