正确安装以及link后,引入NIM模块,调用NIM.login 却说 undefined
如题, 具体提示:
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
对引入的NIM 进行处理 对他进行new操作,然后就可以正常使用。
var nim_process = new NIM()
NIM.login ……
没有深究原因,或许是因为RN版本原因?不得而知。
在更新 react-native 0.44.0 之后,还是会产生相同的错误…
没有link成功