1

I got the google api key from apis console but map is not displaying in my app. just showing a blank screen. Please help me out. im stuck for 3 days

ANDROID MANIFEST

<?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.example.buzzer"
        android:versionCode="1"
        android:versionName="1.0" >

        <uses-sdk
            android:minSdkVersion="8"
            android:targetSdkVersion="19" />

   <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <!-- The following two permissions are not required to use
         Google Maps Android API v2, but are recommended. -->
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <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" >
              <meta-data
              android:name="com.google.android.gms.version"
              android:value="18" />
            <meta-data
        android:name="com.google.android.maps.v2.API_KEY"
        android:value="AIzaSyAFej4nLeNrV9TebcLP9HHvm9wiJg5SWYA"/>
            <activity
                android:name="com.example.buzzer.SplashActivity"

                android:noHistory="true"
                android:label="@string/app_name" >
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />

                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
            </application>
            </manifest>

GRAPHICAL LAYOUT

<?xml version="1.0" encoding="utf-8"?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
          android:id="@+id/map"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:name="com.google.android.gms.maps.MapFragment"/>

I checked in different computers by generating SHA key and getting API key. But there was no use. please help me out

1 Answers1

0

Some other suggestions:

  1. Check package name matches the one entered in console. com.example.buzzer in your case.

  2. Try creating and entering a new key in console and in manifest.

  3. Make sure the SHA1 fingerprint and the package name are separated by ;

Tell me if you tried all of the above and maybe add a screen of your console.

Best of luck

peresisUser
  • 1,680
  • 18
  • 23