Java MapActivity:canned';无法获取连接工厂客户端
我正试图在我的android应用程序中使用谷歌地图,但我得到的只是灰色网格,在logcat中它会显示错误,如:Java MapActivity:canned';无法获取连接工厂客户端,java,android,Java,Android,我正试图在我的android应用程序中使用谷歌地图,但我得到的只是灰色网格,在logcat中它会显示错误,如: 02-11 09:49:56.860:E/MapActivity(979):无法获取连接工厂客户端 我已在清单中添加了使用internet的权限 我用过谷歌图书馆 我已经为android应用程序使用了正确的MapAPI密钥 我正在使用正确的模拟器来支持google API 我的模拟器中的浏览器正在工作并连接到互联网,但我的应用程序即使在android mobile上也不工作 这是
02-11 09:49:56.860:E/MapActivity(979):无法获取连接工厂客户端
- 我已在清单中添加了使用internet的权限
- 我用过谷歌图书馆
- 我已经为android应用程序使用了正确的MapAPI密钥
- 我正在使用正确的模拟器来支持google API
我的模拟器中的浏览器正在工作并连接到互联网,但我的应用程序即使在android mobile上也不工作强>
package="com.nawed.maps"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.INTERNET"/>
<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.nawed.maps.ShowMap"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
我的XML文件:
<?xml version="1.0" encoding="utf-8"?>
<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="MyKey"
/>
我见过其他重复的问题,但对我来说不起作用。先谢谢你。啊,把钥匙藏起来…@EarlOfEgo我对你的回答表示感谢。这似乎是同一个问题
<?xml version="1.0" encoding="utf-8"?>
<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="MyKey"
/>