I am following this tutorial. Here are all my related files: activity_main.xml
You need do give External Storage permission with both meta-data:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyCm5xJy0AwN4TfXM6ccpfj2GhqZneFCyiM" />
</application>
You need to have two meta-data
fields. One is required for google play services in general, the second one on top for using maps.
Example snippet from the sample application you should have in [android-sdk]/extras/google/google_play_services/samples/maps/AndroidManifest.xml
<application
android:icon="@drawable/ic_launcher"
android:label="@string/demo_title"
android:hardwareAccelerated="true">
<!-- ** You need to replace the key below with your own key. **
The example key below will not be accepted because it is not linked to the
certificate which you will use to sign this application.
See: https://developers.google.com/maps/documentation/android/start
for instructions on how to get your own key. -->
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyCvGBr5in13NK2yYBR7lhXTtnxj3mrXQy4" />
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
you need
<application..>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="KEY" />
...
</application>