I am an android learner. I have an issue related to GoogleMap
. When I open the app I got blank map screen.
Here is my xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg"
android:orientation="vertical" >
<include layout="@layout/action_top_bar" />
<Spinner
android:id="@+id/city_spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<fragment
android:id="@+id/mapview_events"
android:name="com.google.android.gms.maps.MapFragment"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
class="com.google.android.gms.maps.SupportMapFragment"
tools:layout="@layout/event_locator_screen" />
</LinearLayout>
And here is my error:
02-10 03:09:02.324 5644-5708/? E/Google Maps Android API: Authorization failure. Please see https://developers.google.com/maps/documentation/android/start for how to correctly set up the map. 02-10 03:09:02.324 5644-5708/? E/Google Maps Android API: In the Google Developer Console (https://console.developers.google.com) Ensure that the "Google Maps Android API v2" is enabled. Ensure that the following Android Key exists: API Key: AIzaSyAlA9K-HAA6p2xBTQtQkdIX-PbjZkygqLA Android Application (;): EC:36:6A:04:B1:7A:02:C5:33:45:C6:AC:9E:AC:9F:AA:FE:14:1B:C0;com.example.ajay.hot
Manifest`
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<permission
android:name="com.example.ajay.hot.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.ajay.hot.permission.MAPS_RECEIVE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!-- Required OpenGL ES 2.0. for Maps V2 -->
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.ajay.hot.SplashActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Black.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.example.ajay.hot.MainActivity"
android:label="@string/main_title"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Black.NoTitleBar" />
<activity
android:name="com.example.ajay.hot.JAboutScreen"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Black.NoTitleBar" />
<activity
android:name="com.example.ajay.hot.MemberProfileScreen"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Black.NoTitleBar" />
<activity
android:name="com.example.ajay.hot.JContactUs"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Black.NoTitleBar" />
<activity
android:name="com.example.ajay.hot.AddEventActivity"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Black.NoTitleBar"
android:windowSoftInputMode="adjustPan|stateAlwaysHidden" />
<activity
android:name="com.example.ajay.hot.JWebActivity"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Black.NoTitleBar" />
<activity
android:name="com.example.ajay.hot.JEventDetailsActivity"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Black.NoTitleBar" />
<activity
android:name="com.example.ajay.hot.EventLocatorActivity"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Black.NoTitleBar" />
<activity
android:name="com.example.ajay.hot.EventDirectonsActivity"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Black.NoTitleBar" />
<activity
android:name="com.example.ajay.hot.JSponsorsActivity"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Black.NoTitleBar" />
<!-- Goolge Maps API Key -->
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyAlA9K-HAA6p2xBTQtQkdIX-PbjZkygqLA" />
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<!-- Live android:value="AIzaSyCXOfQlLbtSYF9ztdGLyiAoBl6Ts5YQkxQ" /> -->
<!-- Test android:value="AIzaSyB7aB015Msr5ZhV_Su_ePSZIQtDzMo4Kz8" -->
</application>
`