04-01 10:17:20.701: E/MapActivity(377): Couldn't get connection factory client
All I get is gray tiles and the map doesn't get loaded.
Hey everyone I know there are lots of similar posts I did thoroughly go through them.
It can be Internet permission (I added that before application tag ), Or
uses-library android:name="com.google.android.maps" (Added inside application tag ) or
it's bad API Key.
Here's the thing I earlier created a debug key and Google map api v1 displayed map correctly with no problem. Later when i opened that project it didn't resolve MapActivity,GeoPoint,MapController etc..
so I created another debug key which I'm using now on this project and I double checked I followed all the steps correctly when creating api.
Is this(me creating a new debug over old) causing this problem? Should I delete the debug.keystore in C:\Users\abc.android and debug the project to automatically create a new? would it solve the problem or will it lead me to more problems?
I've been searching for a solution since yesterday I still have the problem please help me.Thank you so much in advance if any code is needed let me know I'll post them.
MActivity.java
package com.Aws0mEKCkreaTi0ns.GlobAlpSystracKerKC;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
import android.os.Bundle;
public class MActivity extends MapActivity {
MapController mControl;
GeoPoint GeoP;
MapView mapV;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.map);
mapV =(MapView)findViewById(R.id.mapView);
mapV.displayZoomControls(true);
mapV.setBuiltInZoomControls(true);
double lat = 6.796396;
double longi = 79.877823;
mControl = mapV.getController();
GeoP = new GeoPoint((int)( lat * 1E6 ),(int)( longi * 1E6 ));
mControl.animateTo(GeoP);
mControl.setZoom(13);
}
@Override
protected boolean isRouteDisplayed() {
// TODO Auto-generated method stub
return false;
}
}
map.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/layoutbg"
android:orientation="vertical" >
<com.google.android.maps.MapView
android:id="@+id/mapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:apiKey="AIzaSyCy32DkrrrrT-UBhoT8xiAW182qUaAqi3s"
android:enabled="true"
android:clickable="true" />
</RelativeLayout>
Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.Aws0mEKCkreaTi0ns.GlobAlpSystracKerKC"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="17"/>
<permission
android:name="com.Aws0mEKCkreaTi0ns.GlobAlpSystracKerKC.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-permission android:name="com.Aws0mEKCkreaTi0ns.GlobAlpSystracKerKC.permission.MAPS_RECEIVE"/>
<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"/>
<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: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.Aws0mEKCkreaTi0ns.GlobAlpSystracKerKC.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="com.Aws0mEKCkreaTi0ns.GlobAlpSystracKerKC.MenuActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.Aws0mEKCkreaTi0ns.GlobAlpSystracKerKC.KCLOGO" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.Aws0mEKCkreaTi0ns.GlobAlpSystracKerKC.AddFromContactsActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.Aws0mEKCkreaTi0ns.GlobAlpSystracKerKC.ADDFROMCONTACT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.Aws0mEKCkreaTi0ns.GlobAlpSystracKerKC.MActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.Aws0mEKCkreaTi0ns.GlobAlpSystracKerKC.MAPS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.Aws0mEKCkreaTi0ns.GlobAlpSystracKerKC.LoginActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.Aws0mEKCkreaTi0ns.GlobAlpSystracKerKC.LOGIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.Aws0mEKCkreaTi0ns.GlobAlpSystracKerKC.SignupActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.Aws0mEKCkreaTi0ns.GlobAlpSystracKerKC.SIGNUP" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.Aws0mEKCkreaTi0ns.GlobAlpSystracKerKC.AddToContactsActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.Aws0mEKCkreaTi0ns.GlobAlpSystracKerKC.ADDTOCONTACTS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyCy32DkrrrrT-UBhoT8xiAW182qUaAqi3s"/>
</application>
</manifest>