android baidu map 问题

使用百度地图Api时报错,每次都是第二次进入这个Activity出现改错误,出现的问题是mapview.getMap(),获取的对象是null。是什么原因导致的呢?

                                           java.lang.NullPointerException: Attempt to read from field 'int com.baidu.platform.comapi.map.B.b' on a null object reference
                                                       at com.baidu.mapapi.map.MapStatus.a(Unknown Source)
                                                       at com.baidu.mapapi.map.BaiduMap.getMapStatus(Unknown Source)
                                                       at com.baidu.mapapi.map.BaiduMap.a(Unknown Source)
                                                       at com.baidu.mapapi.map.BaiduMap.setMapStatus(Unknown Source)
                                                       at com.jump.zzy.go.view.activity.MapActivity.setMapCenter(MapActivity.java:152)
                                                       at com.jump.zzy.go.view.activity.MapActivity.access$200(MapActivity.java:51)
                                                       at com.jump.zzy.go.view.activity.MapActivity$1.onReceiveLocation(MapActivity.java:129)
                                                       at com.baidu.location.LocationClient.k(Unknown Source)
                                                       at com.baidu.location.LocationClient.if(Unknown Source)
                                                       at com.baidu.location.LocationClient.if(Unknown Source)
                                                       at com.baidu.location.LocationClient$a.handleMessage(Unknown Source)
                                                       at android.os.Handler.dispatchMessage(Handler.java:102)
                                                       at android.os.Looper.loop(Looper.java:135)
                                                       at android.app.ActivityThread.main(ActivityThread.java:5294)
                                                       at java.lang.reflect.Method.invoke(Native Method)
                                                       at java.lang.reflect.Method.invoke(Method.java:372)
                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
查看回复