React-native, “Native module cannot be null”

前端 未结 12 1148
星月不相逢
星月不相逢 2020-12-09 14:42

I just upgrade React-native from 0.28 to 0.30, and get this error:

\"Native module cannot be null\".

The problem seem to be with the line/package:

12条回答
  •  被撕碎了的回忆
    2020-12-09 14:56

    My issue had the same symptoms but a much different root cause. I had two React Native projects open in two different instances of Xcode. My Metro bundler was still running from Project A and causing problems running Project B in the simulator.

    The fix: close the old terminal window spawned by Xcode that had the Metro Bundler running and re-run the project.

提交回复
热议问题