Expo: [solved] Issue with MapView after updating to sdkVersion 22

Created on 23 Oct 2017  路  3Comments  路  Source: expo/expo

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"_:

simulator screen shot oct 23 2017 1 06 43 am

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.

Most helpful comment

Accessing Expo.MapView just requires react-native-maps. Could you perhaps have two copies of react-native-maps installed?

All 3 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rollymaduk picture rollymaduk  路  3Comments

fredjens picture fredjens  路  3Comments

phenrigomes picture phenrigomes  路  3Comments

w4ndry picture w4ndry  路  3Comments

julesmoretti picture julesmoretti  路  3Comments