Hi,
After upgrading my app to "sdkVersion": "22.0.0"
, I am getting an error when rendering MapView
from expo. The error says, _"Tried to register two views with the same name AIRMap"_:
I was not able to find much when googling the error, but was able to resolve the issue by importing MapView
from react-native-maps
instead of expo
.
I did not attempt to re-create this in a Snack, but please let me know if you'd like me to provide more details.
Accessing Expo.MapView just requires react-native-maps
. Could you perhaps have two copies of react-native-maps installed?
I created a new project and changed App.js to this:
import React from 'react';
import { MapView } from 'expo';
export default class App extends React.Component {
render() {
return (
<MapView style={{flex: 1}} />
);
}
}
it worked as expected. please try to create a minimal repro of this to help us narrow down the issue (I'd be surprised if you didn't solve your problem in the process). Suggested reading re: submitting issues: https://www.snoyman.com/blog/2017/10/manipulating-maintainers
Hi @ide, thank you for your response. The issue was due to me having react-native-maps
in my package.json as you suspected.
@brentvatne , I didn't intend to be careless with my issue, but will be more conscious going forward. I think I've attempted to be thoughtful in some other instances (#802 and #436), so I apologize for this mishap.
Thank you both for your time and continued great work on this project.
Most helpful comment
Accessing Expo.MapView just requires
react-native-maps
. Could you perhaps have two copies of react-native-maps installed?