无法获取连接工厂客户端瓷砖加载android
问题描述:
我想加载谷歌地图,但我一直在得到“无法获得连接工厂客户端。地图加载,所以我假设关键是正确的,但那就是我所能做的该缩放控件将不会加载在所有的,我不能在所有的移动地图。无法获取连接工厂客户端瓷砖加载android
package com.saff.maps;
import android.content.Context;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
public class gpsActivityTest extends MapActivity{
private MapController mMapController;
private GeoPoint mGeoPoint;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
MapView mMapView = new MapView(this, "033wSZETHVmHYoRTPurperVQKTS8-zCsTzcbcaA");
setContentView(mMapView);
mMapView.setBuiltInZoomControls(true);
mMapController = mMapView.getController();
LocationManager mLocation= (LocationManager) getSystemService(Context.LOCATION_SERVICE);
mLocation.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, new updateHandler());
}
@Override
protected boolean isRouteDisplayed() {
return false;
}
public class updateHandler implements LocationListener{
public void onLocationChanged(Location location) {
int lat = (int) (location.getLatitude() * 1E6);
int lng = (int) (location.getLongitude() * 1E6);
mGeoPoint = new GeoPoint(lat, lng);
mMapController.animateTo(mGeoPoint);
mMapController.setCenter(mGeoPoint);
}
public void onProviderDisabled(String provider) {
// TODO Auto-generated method stub
}
public void onProviderEnabled(String provider) {
// TODO Auto-generated method stub
}
public void onStatusChanged(String provider, int status, Bundle extras) {
// TODO Auto-generated method stub
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.saff.maps" android:versionCode="1" android:versionName="1.0">
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<application android:icon="@drawable/ic_launcher" android:label="@string/app_name">
<uses-library android:name="com.google.android.maps" android:required="true" />
<activity android:label="@string/app_name" android:name=".gpsActivityTest">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
我没有把我的API代码在xml文件,因为我得到“便无法找到mapViewStyle主题“。我不知道什么问题是肯定的,我不会有这个问题,如果我的api键是正确的
我GOOGLE了广泛,但不回答我的问题,因为我没有其他错误除此之外,这里是我的logcat:
02-10 00:10:26.305: I/Zygote(721): Zygote: pid 721 has INTERNET permission, then set capability for CAP_NET_RAW
02-10 00:10:27.135: I/ApplicationPackageManager(721): cscCountry is not German : H3G
02-10 00:10:31.145: I/MapActivity(721): Handling network change notification:CONNECTED
02-10 00:10:31.145: E/MapActivity(721): Couldn't get connection factory client
02-10 00:10:31.145: V/InputMethodManager(721): onWindowFocus: null softInputMode=288 first=true flags=#10100
02-10 00:10:31.145: V/InputMethodManager(721): Has been inactive! Starting fresh
02-10 00:10:31.145: V/InputMethodManager(721): focusIn: [email protected]
02-10 00:10:31.145: V/InputMethodManager(721): checkFocus: view=null [email protected]52e0 restart=true
02-10 00:10:31.145: V/InputMethodManager(721): Starting input: [email protected]52e0
02-10 00:10:31.145: V/InputMethodManager(721): Starting input: [email protected] ic=null
02-10 00:10:31.175: V/InputMethodManager(721): START INPUT: [email protected] ic=null [email protected] initial=true
02-10 00:10:31.495: V/InputMethodManager(721): Starting input: Bind result=InputBindResult{null com.swype.android.inputmethod/.SwypeInputMethod #5}
02-10 00:10:32.265: V/InputMethodManager(721): Starting input: [email protected]52e0
02-10 00:10:32.265: V/InputMethodManager(721): Starting input: [email protected] ic=null
02-10 00:10:32.265: V/InputMethodManager(721): Starting input: finished by someone else ([email protected]52e0 conn=false)