Android地图V2不能获得连接工厂客户端 [英] Android Maps v2 Couldn't get connection factory client

查看:169
本文介绍了Android地图V2不能获得连接工厂客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题。我得到一个空白的谷歌地图。我试图绕过球网的一切。但似乎没有任何解决这个问题。我已经粘贴下面的logcat的。我曾经尝试都调试键和释放键。但两者都没有工作。该地图是行不通的。我刚刚得到一个灰色的背景与谷歌下面写:(请帮助

I have a problem. I am getting a blank google map. I tried everything around the net. But nothing seems to solve this issue. I have pasted the logcat below. I have tried both debug key and release key. But both are not working. The map is not working. I just get a grey background with Google written below :( Please help

09-04 12:29:57.037: E/MapActivity(9569): Couldn't get connection factory client
09-04 12:29:57.067: D/dalvikvm(9569): GC_FOR_ALLOC freed 54K, 2% free 9295K/9464K, paused 14ms, total 14ms
09-04 12:29:57.637: W/System.err(9569): IOException processing: 26
09-04 12:29:57.637: W/System.err(9569): java.io.IOException: Server returned: 3
09-04 12:29:57.647: W/System.err(9569):     at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:115)
09-04 12:29:57.647: W/System.err(9569):     at android_maps_conflict_avoidance.com.google.googlenav.map.MapService$MapTileRequest.readResponseData(MapService.java:1473)
09-04 12:29:57.657: W/System.err(9569):     at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.processDataRequest(DataRequestDispatcher.java:1117)
09-04 12:29:57.657: W/System.err(9569):     at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.serviceRequests(DataRequestDispatcher.java:994)
09-04 12:29:57.657: W/System.err(9569):     at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.java:1702)
09-04 12:29:57.657: W/System.err(9569):     at java.lang.Thread.run(Thread.java:841)

我的XML

<LinearLayout 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"
    android:orientation="vertical"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".MainActivity" >

    <TextView 
        android:id="@+id/textlat"
        android:layout_height="wrap_content"
        android:layout_width="fill_parent"/>
    <TextView 
        android:id="@+id/textlong"
        android:layout_height="wrap_content"
        android:layout_width="fill_parent"/>
    <com.google.android.maps.MapView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/mapview"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:clickable="true"
    android:apiKey="API Key"/>  

</LinearLayout>

我的清单

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

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

    <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true"/>
    <permission
    android:name="com.rrj.maps.permission.MAPS_RECEIVE" android:protectionLevel="signature" />
    <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-permission android:name="com.rrj.maps.permission.MAPS_RECEIVE" />
    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >

        <activity
            android:name="com.rrj.maps.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>
        <meta-data
         android:name="com.google.android.maps.v2.API_KEY"
         android:value="API_KEY"/>
        <uses-library android:name="com.google.android.maps"/>
    </application>

</manifest>

[更新]:我想再次产生sha1fingerprint。我观察到,使用的签名算法SHA256withRSA,其中作为<一个例子href=\"https://developers.google.com/maps/documentation/android/start#displaying_certificate_information\"相对=nofollow>谷歌开发站点显示SHA1withRSA这可能会造成什么问题?

[UPDATE]: I tried generating the sha1fingerprint again. I observed that the signature algorithm used is SHA256withRSA where as the example in the google dev site show SHA1withRSA could this be causing any problem?

推荐答案

在您使用PLD谷歌地图API v1的XML文件。而在你的清单文件已经写了code为谷歌地图V2 SO ..只需添加这在XML中老替换。

In your XML file you are using pld Google Map API v1.. And in your Manifest file you have wrote code for Google Map V2.. SO just add this in xml replace with old.

<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"/>

和肯定的同时删除

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

从清单文件....

from manifest file....

您也可以参考这样的:

<一个href=\"http://stackoverflow.com/questions/15737960/still-gets-couldnt-get-connection-factory-client-error\">Still获取&QUOT;无法获取连接工厂客户端和QUOT;错误

<一个href=\"http://stackoverflow.com/questions/15729330/android-google-map-couldnt-get-connection-factory-client\">android谷歌地图无法获取连接工厂客户

这篇关于Android地图V2不能获得连接工厂客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆