Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/180.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 地图视图:无法';无法获取连接工厂客户端_Android_Google Maps - Fatal编程技术网

Android 地图视图:无法';无法获取连接工厂客户端

Android 地图视图:无法';无法获取连接工厂客户端,android,google-maps,Android,Google Maps,在我的Android应用程序中,我有一个Google MapView活动,我面临以下错误: MapView: Couldn't get connection factory client 首先:我有一个正确的地图键和Internetpermission,地图在模拟器和设备上显示良好。我感到困惑的是,尽管地图可以工作,但上面的错误仍然会显示出来 在设备上,有时地图加载和显示正确,1分钟后,如果开始缩放和挤压地图,地图不会继续加载并抛出错误 如果我关闭并再次打开设备上的移动网络,地图会再次正常工作

在我的Android应用程序中,我有一个Google MapView活动,我面临以下错误:

MapView: Couldn't get connection factory client
首先:我有一个正确的地图键和Internetpermission,地图在模拟器和设备上显示良好。我感到困惑的是,尽管地图可以工作,但上面的错误仍然会显示出来

在设备上,有时地图加载和显示正确,1分钟后,如果开始缩放和挤压地图,地图不会继续加载并抛出错误

如果我关闭并再次打开设备上的移动网络,地图会再次正常工作

编辑:我的清单文件:

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

<!-- We're supporting AndroidSDK 7 -->
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="7"/>

<!-- We need access to the internet for loading maps -->
<uses-permission android:name="android.permission.INTERNET"/>
<!-- We're using both, network and GPS -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>

<application android:icon="@drawable/icon" android:label="@string/app_name" 
    android:theme="@style/DefaultTheme">

    <!-- 4 test -->
    <uses-library android:name="android.test.runner" />

    <!-- We're using Google Maps API -->
    <uses-library android:required="true" android:name="com.google.android.maps" />

    <!-- Dashboard -->
    <activity android:name=".MobileSchatzsucheActivity" android:label="@string/app_name" android:launchMode="singleTask">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <!-- Maps Activity -->
    <activity android:name=".GoogleMapsActivity" />

    <!-- Schatzliste Activity -->
    <activity android:name=".SchatzlisteActivity" android:launchMode="singleTask"/>

    <!-- Schatzdetails Activity -->
    <activity android:name=".DetailsActivity"/>

    <!-- MyTreasuresCoverFlowActivity -->
    <activity android:name=".MyTreasuresCoverFlowActivity"/>

    <!-- Preferences Activity-->
    <activity android:name=".PreferencesActivity" 
              android:theme="@android:style/Theme"/>

    <!-- FileBrowser Activity -->
    <activity android:name=".FileBrowserActivity"
              android:theme="@android:style/Theme"/>

</application>

<instrumentation android:name="android.test.InstrumentationTestRunner"
    android:targetPackage="de.incowia.mobileschatzsuche" 
    android:label="test test" />

</manifest>

试着给这两个权限

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>

因为当你放大/缩小谷歌地图时,它会相应地放大/缩小,因此我们需要给予这样的许可。
然后它将工作

查看并粘贴您的Manifest文件我在清单文件中已经有这两个权限,但错误仍然存在。