I have implemented google map in my app.But its display only blank grids.I have done changes in AndroidManifest.xml file and also included API key in layout file of map activity.
This may sound silly, but I kept encountering this problem until I realized that the <uses-permission>
tags need to be direct children to the <manifest>
element, rather than the <application>
element. I had erroneously been putting them right after the <uses-library>
tag. So the final structure of your AndroidManifest.xml file should be something like this:
<?xml version="1.0" encoding="utf-8"?>
<manifest ... >
<uses-sdk ... />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<application ... >
<activity ... >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<uses-library android:name="com.google.android.maps" />
</application>
</manifest>
Hope this helps anyone who was making the same mistake!
I was having the same problems until I realised that in the API console I had enabled
Google Maps API v2
and not the
Google Maps Android API v2
Once I enabled it everything was fine.
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