xuexiangjys / react-native-xupdate

A React-Native plugin for XUpdate(Android Version Update Library)
Apache License 2.0
53 stars 20 forks source link

Native module cannot be null. #8

Open nozbwang opened 4 years ago

nozbwang commented 4 years ago

yarn ios command fails on ios, while yarn android works well on android.

error message:

[Mon Oct 12 2020 14:29:17.242] ERROR Invariant Violation: Native module cannot be null. [Mon Oct 12 2020 14:29:17.243] ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication) [Mon Oct 12 2020 14:29:18.316] ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)

package.json

"react": "16.13.1",
"react-native": "0.63.2",
"react-native-xupdate-new": "^1.0.0",
...
nozbwang commented 4 years ago

***.js

...
import {XUpdate, InitArgs, UpdateArgs, UpdateEntity} from 'react-native-xupdate-new';

const errorListener = (error) => {
  console.log(error);
};

export default class Setting extends Component {

  constructor(props) {
    super(props)
    this.state = {
      latest: true,
    };
  }

  componentDidMount() {
    this.checkVersion()
    this.initXUpdate()
  }
...
tourze commented 3 years ago

遇到一样问题。我是在ios模拟器上出现的。