i want to make maps in android fragment with use extend fragment
this is my code : Maps do not come up, and system force close
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.gmaps, container, false);
SupportMapFragment mapFragment = ((SupportMapFragment) getActivity().getSupportFragmentManager() .findFragmentById(R.id.map));
mapFragment.getMapAsync((OnMapReadyCallback) this.getActivity());
btnFindPath = (Button) view.findViewById(R.id.btnFindPath);
etOrigin = (EditText) view.findViewById(R.id.etOrigin);
etDestination = (EditText) view.findViewById(R.id.etDestination);
btnFindPath.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
sendRequest();
}
});
return view;
please help me, and thank you