title: The specified child already has a parent. You must call removeView() on the child's parent first react native
body: <p>I want use Marker inside MapView. Every time I want to load I face this error . Any help would be appreciated. </p>
  
  <p>I got some solutions. But didn't workout for my case.</p>
  
  <pre class="lang-js prettyprint-override"><code>import React, { Component } from "react";
  
  import MapView, { Polyline } from "react-native-maps";
  
  &lt;View style={StyleSheet.absoluteFillObject}&gt;
    &lt;MapView
      showsUserLocation //to show user current location when given access
      loadingEnabled //to show loading while map loading
      style={styles.map}
      initialRegion={{
        // latitude : 27.6937681,
        latitude,
        // longitude : 85.3216398,
        longitude,
        latitudeDelta: 0.0922,
        longitudeDelta: 0.0421
      }}
    &gt;
      &lt;&gt;
        {locations &amp;&amp;
          locations.map((location, index) =&gt; {
            const {
              coords: { latitude, longitude }
            } = location;
            return (
              &lt;Marker
                key={index}
                coordinate={{ latitude, longitude }}
                // onPress={this.onMarkerPress(location)}
              /&gt;
            );
          })}
  
        &lt;Polyline strokeWidth={2} strokeColor="red" coordinates={coords} /&gt;
      &lt;/&gt;
    &lt;/MapView&gt;
  &lt;/View&gt;
  </code></pre>
  
  <p>I want to render Marker with no error.</p>
  
  <p>Here are my dependencies used :</p>
  
  <pre><code>"dependencies": {
      "native-base": "^2.13.8",
      "react": "16.9.0",
      "react-native": "0.61.2",
      "react-native-maps": "git+https://git@github.com/react-native-community/react-native-maps.git"
  }```
  </code></pre>