我使用谷歌地图v2与片段,谷歌地图加载正常,但在一些设备,如MiUi和华为它没有加载地图在wifi连接和显示未知的Handhshake错误,以下是代码片段。
private void initilizeMap() {
if (googleMap == null) {
googleMap = ((MapFragment) getActivity().getFragmentManager().findFragmentById(R.id.map)).getMap();
buildGoogleApiClient();
setupLocationClient();
// check if map is created successfully or not
if (googleMap == null) {
Toast.makeText(getActivity(), "Sorry! unable to create maps", Toast.LENGTH_SHORT).show();
}
}
}