DeviceInfo native module is not installed correctly in react native

左心房为你撑大大i 提交于 2019-12-11 06:05:40

问题


Hi I am trying to run my react-native android application on the device. It was working well, suddenly I am getting an error on running application.

DeviceInfo native module is not installed correctly

I have checked this DeviceInfo native module is not installed correctly but it did not work for me. I restarted my system to kill all process.

Can anyone help me how to solve this issue ?

D:\React Native\ReduxExample1>react-native -v
react-native-cli: 2.0.1
react-native: 0.44.0

D:\React Native\ReduxExample1>

回答1:


I was running different application which is also built in react-native but did not run react-native server of that application. This was just my bad :)




回答2:


I think this type of errors when you are not in the right packages. So as per my experience Make sure you have the right packager running in the terminal, sometimes you may have a packager associated with another react native project running, this happens because when you stop running a React Native project from Xcode or Android Studio, it doesn't stop the packager in the terminal, and when you start/open another React Native project in Xcode or Android Studio, it simply checks if a packager is running, doesn't check if it's associated with the current project. So make sure you stop all of the packager instances in the terminal and then open the React Native project again.



来源:https://stackoverflow.com/questions/43781196/deviceinfo-native-module-is-not-installed-correctly-in-react-native

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!