quypham avatar image
quypham asked

Error when using MapView in Fragment

Hi all, currently i use MapView in XML file to display Amazon Map in my fragment but when i try to run it,the following error happens. Can you guys tell me what happen here and how can i fix it? Thanks My code: mMapView = (MapView) contentView.findViewById(; mMapView.onCreate(savedInstanceState); mMapView.onResume(); My Mapview XMl: Here are the log cat: java.lang.IllegalStateException: Must call onAttach on DebugFragment before calling getContext. at at at at at at at at com.directv.common.ui.dtvuisecondscreen.location.LocationDialogFragmentPost.onCreateView( at at at at at at$ at android.os.Handler.handleCallback( at android.os.Handler.dispatchMessage( at android.os.Looper.loop( at at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke( at$ at
amazon maps
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers