Question

i am kind of new in google map based apps and was trying hand on it.i used following mainfest

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.abhishekbietcs.locomap"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="15" />
<permission
      android:name="com.abhishekbietcs.locomap.permission.MAPS_RECEIVE"
      android:protectionLevel="signature"/>
    <uses-permission android:name="com.abhishekbietcs.locomap.permission.MAPS_RECEIVE"/>

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<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:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name="com.abhishekbietcs.locomap.Mapme"
        android:label="@string/title_activity_mapme" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

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

    <meta-data
        android:name="com.google.android.maps.v2.API_KEY"
        android:value="my key" />
</application>

i got my debug cerificate sh1 fngrprint from this code

keytool.exe -list -alias androiddebugkey -keystore ".....\.android\debug.keystore" -storepass android -keypass android -v

this is my xml

<RelativeLayout 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"
tools:context=".Mapme" >
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
 android:id="@+id/map"
 android:layout_width="match_parent"
 android:layout_height="match_parent"
 class="com.google.android.gms.maps.SupportMapFragment"/>

now whene i install in my phone,google authorization failure appears in log cat.please help me out where i did mistake,thanks in advance

Was it helpful?

Solution

There are a few steps that you have to take before creating app which uses Google Maps API:

  • creating Google API project in Google APIs Console (https://code.google.com/apis/console)
  • enabling Google Maps API for Android (in the Services tab)
  • creating new Client ID (you should enter SHA1 key and your's app package name)

Have you done all of that? If yes, please provide logcat output which contains information concerning authorization failure.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top