Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

地图初始化报错:TypeError: null is not an object (evaluating 'BaiduMapInitializer.init') #255

Open
koo19 opened this issue Apr 23, 2021 · 3 comments

Comments

@koo19
Copy link

koo19 commented Apr 23, 2021

ERROR TypeError: null is not an object (evaluating 'BaiduMapInitializer.init')
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling unmountApplicationComponentAtRootTag)
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)

@koo19
Copy link
Author

koo19 commented Apr 25, 2021

错误发生在 /node_modules/react-native-baidumap-sdk/lib/js/modules/initializer.js

// @flow
import { NativeModules, Platform } from 'react-native'

const { BaiduMapInitializer } = NativeModules

export default {
  init(key: string) {
    if (Platform.OS === 'android') {
      return BaiduMapInitializer.init()
    }
    return BaiduMapInitializer.init(key)
  },
}

BaiduMapInitializer 为空

@ma6566966
Copy link

错误发生在 /node_modules/react-native-baidumap-sdk/lib/js/modules/initializer.js

// @flow
import { NativeModules, Platform } from 'react-native'

const { BaiduMapInitializer } = NativeModules

export default {
  init(key: string) {
    if (Platform.OS === 'android') {
      return BaiduMapInitializer.init()
    }
    return BaiduMapInitializer.init(key)
  },
}

BaiduMapInitializer 为空

怎么解决的

@cbxbw
Copy link

cbxbw commented Jun 26, 2023

如何解决?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants