title: java.lang.ClassCastException: com.here.android.mpa.mapping.MapView cannot be cast to com.here.android.mpa.mapping.AndroidXMapFragment
body: <p>Hi I'm working with here SDK for android and I keep getting this error 
  my project has a navigation drawer and I'm trying to have a map in one of its fragments with here SDK 
  here are my XML and Kotlin code and the error
  my error :</p>
  
  <p><code>java.lang.ClassCastException: com.here.android.mpa.mapping.MapView cannot be cast to com.here.android.mpa.mapping.AndroidXMapFragment
          at com.example.pplin_mobilite.ui.Passager.PassagerFragment.onActivityCreated(PassagerFragment.kt:22)
          at androidx.fragment.app.Fragment.performActivityCreated(Fragment.java:2717)
          at androidx.fragment.app.FragmentStateManager.activityCreated(FragmentStateManager.java:346)
          at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1188)
          at androidx.fragment.app.FragmentManager.addAddedFragments(FragmentManager.java:2224)
          at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1997)
          at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1953)
          at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1849)
          at androidx.fragment.app.FragmentManager$4.run(FragmentManager.java:413)
          at android.os.Handler.handleCallback(Handler.java:873)
          at android.os.Handler.dispatchMessage(Handler.java:99)
          at android.os.Looper.loop(Looper.java:193)
          at android.app.ActivityThread.main(ActivityThread.java:6758)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:497)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:912)</code></p>
  
  <p>my kotlin class :</p>
  
  <pre><code>class PassagerFragment : Fragment() {
  
  override fun onActivityCreated(savedInstanceState: Bundle?) {
      super.onActivityCreated(savedInstanceState)
  
      // Search for the Map Fragment
      val mapFragment = map_frag as AndroidXMapFragment
      // initialize the Map Fragment and
      // retrieve the map that is associated to the fragment
      mapFragment.init { error -&gt;
          if (error == OnEngineInitListener.Error.NONE) {
              // now the map is ready to be used
              mapFragment.map
              // ...
          } else {
              println("ERROR: Cannot initialize AndroidXMapFragment")
          }
      }
  }
  
  override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
      return inflater.inflate(R.layout.fragment_notifications,container,false)
  }
  </code></pre>
  
  <p>}</p>
  
  <p>and my xml :</p>
  
  <pre><code> &lt;fragment
      class="com.here.android.mpa.mapping.AndroidXMapFragment"
      android:id="@+id/map_frag"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent"
  
      /&gt;
  </code></pre>