Android MapsDemo problem
HI,
I have implemented the example MapsDemo in my emulator. But i 开发者_如何学Pythoncouldn't got any map instead of this i got empty map which doesn't contain anything, i have generated the map key also and given at menu.xml in layout section. Please help ?
You get an empty map when the key you use to build the apk is not the one used to generate the map key.
If you are building with Eclipse modify the key you are using to build or just get a key for the debug keystore.
I got a similar error because I confused the MD5 fingerprint with the API Key. You need the MD5 fingerprint to obtain the API Key. It seems stupid by I did it ;·)
Make sure you put the key in the code in addition to the mapview.xml. In MapViewCompassDemo's on create method, there is a line:
mMapView = new MapView(this, "yourkey");
You need to replace that too.
精彩评论