未处理的JS异常:不变冲突: requireNativeComponent:"AIRMap“未在UIManager.中找到
此错误位于: in AIRMap (at MapView.js:760) in MapView (at App.js:25) in RCTView (at View.js:43) in App (at renderApplication.js:32) in RCTView (at View.js:43) in RCTView (at View.js:43) in AppContainer (at renderApplication.js:31)
如何修复本机ios中的此错误?
发布于 2018-08-15 06:13:43
添加到ios/YOUR_PROJECT_NAME/AppDelegate.m中
@import GoogleMaps; //add this line if you want to use Google Maps
和
[GMSServices provideAPIKey:@"_YOUR_API_KEY_"]; // add this line using the api key obtained from Google Console
发布于 2019-04-18 11:45:52
我也犯了这个错误,我用这样的方法修正了:
因为只有一个人可以在npm上发布,所以我们应该使用Git进行最新的更新等等。
发布于 2020-05-26 10:56:45
我已经向package.json添加了以下脚本。对我来说很管用。
{
"name": "your-app",
"scripts": {
"postinstall": "./node_modules/react-native-maps/enable-google-maps REPLACE_ME_RELATIVE_PATH_TO_GOOGLE_MAPS_INSTALL"
}
}https://stackoverflow.com/questions/51318063
复制相似问题