安卓 map View :Couldn't find the connection factory client

标签 android google-maps android-mapview mapactivity

据我所知,这个问题在这里讨论了很多次,但在我尝试时,我仍然遇到了同样的问题,并且尝试了我在这里看到的和谷歌看到的一切,但这个问题仍然没有得到解决。

此外,我尝试了很多网站的示例代码,也出现了同样的问题。(问题是在 MapActivity 派生类上,我可以看到 grid 但 map抛出上述异常时未加载)

我尝试使用自己的 API key 以及示例代码中已经存在的 key 。并且,还尝试在设备中启用和禁用位置选项。

请务必为我提供帮助。

下面使用了一个 list 文件...

**

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

**

最佳答案

终于,在搞砸了两天之后,我仍然得到了解决方案,如果有人有最好的请更新我。

我所做的是,在查看了这么多线程和链接之后,我知道上面的代码/ list 没有任何问题,所以我深入研究了 Google Map API key ,下面的解决方案为我指明了方向......(请请注意,我正在通过 mac 进行开发)。

首先,我打开我的终端,在那里我访问了 Java 文件夹和它的 bin 文件夹,然后在命令下输入以下内容:-

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

请注意,在上面的命令“\User.android\debug.keystore”中,这是您保存 android 调试 key 的路径,以防在 eclipse 中找到该路径(可能与您的系统不同) ), 使用以下内容:

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

因此,当您运行上面的命令时,您会找到 MD5 key ,然后您需要访问以下链接:-

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

在这里,在下面,你将提供上面获得的 MD5 key ,它会为你生成用于调试的 api key 。 仅此而已,然后以所需的 xml 或编码(取决于您的编码方式)提供此 api key 。

但是这个规定是针对v1的。如果有人找到了 v2 的方法,请更新此线程。

关于安卓 map View :Couldn't find the connection factory client,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14745850/

相关文章:

java - 如何使用方法返回的 boolean 值

android - 具有Android注释的Robolectric

google-maps - Google map LatLngBounds.isEmpty 如何工作?

安卓( map View ): How to set Zoom level of 4 miles in the mapview?

java - 在一个类中设置多个对话框并在其中一个对话框上设置 TextView

android - 检查服务是否正在运行

android - 在应用程序启动时更改缩放级别 Google Maps Api v2

android - 在谷歌地图上扩展覆盖标记?

android - 在 Android 上使用复选框更改 GoogleMaps v2 中的 MapView

Android : Showing MyLocationOverlay. enableMyLocation 作为指南针