Googleマップを機能させようとしています。地図を表示していません。LogCat で次のエラーが表示されます
Couldn't get connection factory client
重複した投稿をすべて確認し、次の変更を加えました
- uses-permission と uses-library がタグ内にあることを確認
- カスタムの代わりに debug.keystore を使用
- 秘密鍵を使用してGoogleマップにサインアップし、xmlのmapsキーでMapViewを更新しました(この公開投稿では、変更しました)
- アプリをエクスポートし、debug.keystore を使用してビルドしました
エミュレーターで実行しています。エミュレータ上のマップは動作します。
Android マニフェスト
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<uses-library android:name="com.google.android.maps" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<activity
android:name=".MyActivity"
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=".GetLocation" android:label="@string/app_name"/>
</application>
location.xml
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:apiKey="0psLgKtDQLB35-XJXUrjR4bKHIBDRuHu-O-xVhg"
android:id="@+id/location"
/>
sudo keytool -list -alias androiddebugkey -storepass android -keypass android -keystore debug.keystore
戻り値
androiddebugkey, 20 Mar, 2012, PrivateKeyEntry,
Certificate fingerprint (MD5): 20:D3:54:D9:F8:70:17:A4:BA:21:5C:98:88:27:45:E0
uses-permission を Application タグの外側に配置し、uses-library を Application タグの内側に配置するのを修正しました