I found lots of questions regarding this - and I am almost ashamed to ask it myself.
But no matter how hard I try, I simple do not get the Maps API running at all!
Not with the demo project, com.example.mapdemo, not with my own project.
I definitely have my debug.keystore SHA1 fingerprint registered, now for both my app and com.example - I also tried the browser API key where everybody says that would work, too.
BUT NO.
I always get:
06-16 11:21:29.860: E/Google Maps Android API(2382): Authorization failure. Please see https://developers.google.com/maps/documentation/android/start for how to correctly set up the map.
I am getting REALLY, REALLY mad at this. How is it possible to NOT completely and thoroughly describe this matter so that people that are otherwise able to program Android apps, can follow and succeed??
HOW?
Could anybody please tell me what else could be wrong?
Add-on: I set up everything exactly according to the specs, got my key from my debug.keystore, tried it with com.example for the maps demo, with my own package for my app. Does not work. Plus: that silly empty window. How on earth is that gonna work... :-(
Assuming
snippet from manifest:
<!-- Specify the correct minSDK and targetSDK versions. -->
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<!-- Google Maps related permissions -->
<permission
android:name="com.ecs.google.maps.v2.actionbarsherlock.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.mapdemo.permission.MAPS_RECEIVE" />
<!-- Network connectivity permissions -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- Access Google based webservices -->
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<!-- External storage for caching. -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- My Location -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
<!-- Maps API needs OpenGL ES 2.0. -->
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />

you have put the meta-data tag inside the application tag
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyA_u1faIXRhx_Q7NafFbrhQJEerl6UUbPY" />
you made sure that you are building the APK with the correct keystore (corresponding to the one defined in the API console).
From my experience I was able to follow the instructions on Google Maps Android API v2 Getting started, but I do recall having to completely undeploy and redeploy the app again after playing around with the API keys / permissions.
On what device are you running ?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With