(FrameLayout) findViewById - returns null?

You're inflating the layout from travel_map_activity. Xml which only contains one ID: R.id. TravelMapView .

You cannot select items from other layouts ( with a few small exceptions that are more like abuses of the system ).

Are those two Views you are finding (travelMapView and mapFrame) in the same layout travel_map_activity. Because the layout you provided isn't holding travelMapView at all, yet you don't get a NullPointerException there.

Related Questions