В моем фрагменте:
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
public class AgentsFragmentMapTab extends Fragment {
com.google.android.gms.maps.MapFragment mapFragment = (com.google.android.gms.maps.MapFragment) getFragmentManager().findFragmentById(R.id.google_map)
здесь макет:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<fragment
android:id="@+id/google_map"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
class="com.google.android.gms.maps.MapFragment"/>
</LinearLayout>
но я получаю ошибку компиляции:
Inconvertible types; cannot cast 'androidx.fragment.app.Fragment' to 'com.google.android.gms.maps.MapFragment'