Map Activity doesn\'t showing map, it\'s appear as just white screen with zoom control buttons. Manifest File like this :
My suggestion is you can use MapFragment. As far as i know almost all devices are upgraded to 11 and above. MapFragment supports 11 and above. Log into google api console again and check whether your application key is present there or not. I know that you have done it already. But check it again. Because am having an issue where the api key is not getting saved. I have to create a new project everytime. Maybe you are facing the same issue too.
I had the same problem, so I went ahead and created a new key at the API console. Also, make sure you follow instructions for recording your release key on the API console: Displaying the release certificate fingerprint
It works for me now...
I got this problem using MapView
fragment_map.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.gms.maps.MapView
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {
String message = getArguments().getString(EXTRA_MESSAGE);
v = inflater.inflate(R.layout.map_f, container, false);
vh = new ViewHolder();
assetHandler = new AssetHandler(getActivity());
vh.mapView=assetHandler.mapViewHandler.set(v,R.id.mapview);
vh.mapView.onCreate(savedInstanceState);
vh.mapView.getMapAsync(new OnMapReadyCallback() {
@Override
public void onMapReady(GoogleMap googleMap) {
googleMap.getUiSettings().setMyLocationButtonEnabled(true);
googleMap.setMyLocationEnabled(true);
// Needs to call MapsInitializer before doing any CameraUpdateFactory calls
try {
MapsInitializer.initialize(getActivity());
} catch (Exception e) {
e.printStackTrace();
}
}
});
return v;
}
@Override
public void onResume() {
super.onResume();
vh.mapView.onResume();
}
@Override
public void onPause() {
vh.mapView.onPause();
super.onPause();
}
@Override
public void onDestroy() {
vh.mapView.onDestroy();
super.onDestroy();
}
@Override
public void onLowMemory() {
super.onLowMemory();
vh.mapView.onLowMemory();
}
I noticed if the LifeCycle methods are not implemented, you will not be able to see the map as well. hope this is hopeful for some.
I just spent a couple of hours on this same error. I initially did not have the debug keystore API key set up properly and my android device cached the incorrect API key that was hard-coded into my manifest. Eventually I simply deleted the app from the device, cleaned the project, and this cleared whatever residual API key was stored locally on the device. I ran the app again and everything worked like a charm!
Good Luck.
As been mentioned here this problem usually derives from the fact that you are not referencing the google-play-service
library correctly. Please take a look at the first 3 steps of the following guide I wrote no integrating Google Maps in your application and make sure you are doing all the steps correctly:
Google Maps API V2
Did you activate Google Map Service in API console?