title: Type mismatch. Required: Fragment, Found: PlaceAutocompleteFragment
body: <p>I bumped into a</p>
  
  <blockquote>
    <p>Duplicate ID, tag null, or parent id with another fragment for
    placeAutocompleteFragment</p>
  </blockquote>
  
  <p>error, and so i followed this <a href="https://stackoverflow.com/a/19815266/5076153">solution</a> to try and fix it by adding the placeAutocompleteFragment via a fragment transaction using the <code>childFragmentManager</code></p>
  
  <p><strong>fragment class <code>onCreateView</code></strong></p>
  
  <pre><code>val fm: FragmentManager = childFragmentManager
  var placeAutocompleteFragment: PlaceAutocompleteFragment? = fm.findFragmentByTag("placeAutocompleteFragment") as PlaceAutocompleteFragment?
  
  if (placeAutocompleteFragment == null){
      placeAutocompleteFragment = PlaceAutocompleteFragment()
      fm.beginTransaction().add(R.id.address_layout, placeAutocompleteFragment, "placeAutocompleteFragment").commit()
  }
  </code></pre>
  
  <p><strong>.xml</strong></p>
  
  <pre><code>&lt;android.support.constraint.ConstraintLayout
  ...
  ...
  ...
      &lt;LinearLayout
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:id="@+id/address_layout"
          android:background="@drawable/rounded_search_bar"
          android:layout_marginLeft="8dp"
          android:layout_marginRight="8dp"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.0"
          android:layout_marginTop="8dp" app:layout_constraintTop_toTopOf="parent"
          android:orientation="horizontal"&gt;
      &lt;/LinearLayout&gt;
  ...
  ...
  ...
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>
  
  <p>The problem now is on the line </p>
  
  <pre><code>fm.beginTransaction().add(R.id.address_layout, placeAutocompleteFragment, "placeAutocompleteFragment").commit()
  </code></pre>
  
  <p>I get a type mistake for <code>placeAutocompleteFragment</code> Type mismatch. Required: Fragment, Found: PlaceAutocompleteFragment?</p>
  
  <p>Any suggestions?</p>
  
  <p>Thanks</p>