1

As I know, that question is discussed so many time here, but still as I tried I faced the same issue and did all try what I saw here and also by Google but still that issue is unresolved.

Also, I tried the sample codes from so many sites and there also the same problem.(Issue that on MapActivity derived class, I can see the grid but map not loading while threw aforesaid exception)

I tried with my own API key as well as the keys already present in the sample code. And, also tried in device with keeping Location option enable and disable both.

Please do provide me your assistance.

Below is used one manifest file...

**

<permission
      android:name="com.Example.appl.permission.MAPS_RECEIVE"
      android:protectionLevel="signature"/>

<uses-permission android:name="com.Example.appl.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >

   <uses-library android:name="com.google.android.maps" />


    <activity
        android:name="com.Example.appl.MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name=".MHomeActivity"></activity>





</application>

**

Mohit_Jaiswal
  • 840
  • 6
  • 10

4 Answers4

1

Finally, after messing two days, I got the solution still if someone has best please update me.

What I did, after reviewing so many threads and links, I got to know that nothing is wrong with above code/manifest, so I dig into the Google Map API key and below solution see me the way...(Please note that I'm doing my development over mac).

First of all I open my terminal and at there I accessed at Java folder and within it bin folder, then type following beneath command :-

***keytool -list -alias androiddebugkey -keystore \User\.android\debug.keystore -storepass android -keypass android***

Please note that in above command "\User.android\debug.keystore" This is the path where your android debug key is kept, in case in eclipse if you want to find that path(may be it's different on your system), use following:

**eclipse->window->preferences->Android->Build** 

So, when you run above command, you'll find the MD5 key and then you need to access following link:-

https://developers.google.com/maps/documentation/android/v1/maps-api-signup

Here, at beneath you'll give above obtained MD5 key and it'll generate api key for you for debug. That's all then supply this api key either at required xml or coding(Depends how you code).

But this provision is for v1. If someone found a way for v2, please update this thread.

Mohit_Jaiswal
  • 840
  • 6
  • 10
  • this is the first real solution I've founded. – rkmax Feb 20 '13 at 04:59
  • Thanks, rkmax for your feedback. – Mohit_Jaiswal Feb 20 '13 at 09:51
  • Have you found a solution to Maps API v2 API for use with Android 10? – rkmax Feb 20 '13 at 19:01
  • Hi rkmax, actually I didn't allot my task further for v2 as need to deliver the project, but I need to do so will update you and in case if you find something please update this post. – Mohit_Jaiswal Feb 21 '13 at 04:03
  • i've founded solution read [my answer](http://stackoverflow.com/questions/14745850/android-mapviewcouldnt-find-the-connection-factory-client/14994638#14994638). It works fine on a Galaxy ACE – rkmax Feb 21 '13 at 04:37
0

Check wether you have added the map library in android-manifest file inside Application tag.

<uses-library android:name="com.google.android.maps" />
user1744952
  • 508
  • 1
  • 3
  • 15
  • Pardoning to see you late... Dude, I've already kept this tag in my manifest within the application tag... Please suggest me things which you think might be the reason of that issue... – Mohit_Jaiswal Feb 07 '13 at 08:27
0

I searched your problem I have the solution and given below please refer these...

Couldn't get connection factory client in logcat

Couldn't get connection factory client

Community
  • 1
  • 1
Android_coder
  • 9,953
  • 3
  • 17
  • 23
0

After read and browse a lot the answer for use the API v2 even if you are develop for Android 2.2

Get the signature SHA1

keytool -list -alias androiddebugkey -keystore ~/.android/debug.keystore -storepass android -keypass android

get something like (SHA1): 82:73:C3:82:73:C3:82:73:C3:82:73:C3:82:73:C3:82:73:C3

Get API_KEY

Go to Google Api Console in Services set ON to Google Maps Api v2 later in Api Access section click on Create new Android Key or Update if you has one, put inside dialog

82:73:C3:82:73:C3:82:73:C3:82:73:C3:82:73:C3:82:73:C3;COM.PACKAGE.NAME

Add libraries

Add the google-play-services to your project, Go to Project properties -> Android in the section "Library" click Add and browse to sdk-android>/extras/google/google_play_services/libproject/google-play-services_lib.

Check for android-support-v4.jar library in your Project dependencies.

Edit your code

<!--AndroidManifest.xml-->
<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="17" />
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
<permission android:name="COM.PACKAGE.NAME.permission.MAPS_RECEIVE"></permission>
<uses-permission android:name="COM.PACKAGE.NAME.permission.MAPS_RECEIVE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

<!--inside <application> tag-->
<meta-data android:value="API_KEY" android:name="com.google.android.maps.v2.API_KEY"/>

in your Activity class your need extend from android.support.v4.app.FragmentActivity

//MainActivity.java

package COM.PACKAGE.NAME;    

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.Menu;

public class MainActivity extends FragmentActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }

}

and for last you need change your activity_main.xml

<!--./res/layout/activity_main.xml-->
<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"/>
rkmax
  • 17,633
  • 23
  • 91
  • 176
  • Hi, thanks for your quick response but that also I had tried and tested in simulator as well as in my own Carbon(A1+ series) and Samsung mobile, I did faced the same issue.. but let me go once again and will update you – Mohit_Jaiswal Feb 21 '13 at 04:58
  • Today i've tested it in my Galaxy SIII with Android 4.1.1 and works well! – rkmax Feb 21 '13 at 19:41