0
I am trying to add the Google Maps API fragment to the main project screen
error: incompatible types: Mapsfragment cannot be converted to Fragment
part of the code:
fragmentManager = getSupportFragmentManager();
FragmentTransaction transaction = fragmentManager.beginTransaction();
transaction.add(R.id.container, new MapsFragment(), "MapsFragment" ) ;
transaction.commitAllowingStateLoss();
The error appears when I give the New.. command says that it cannot be converted to fragment..
how do I use it on the main screen then ?