1

Google マップを Android アプリケーションに統合しようとしています。このチュートリアルに従いました: https://blog-emildesign.rhcloud.com/?p=435 . 提案どおりにすべてを行いました。エラー ログのエラーは次のとおりです。

E/Google Maps Android API(28238): Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors).
E/Google Maps Android API(28238): Authorization failure.  Please see https://developers.google.com/maps/documentation/android/start for how to correctly set up the map.
E/Google Maps Android API(28238): Ensure that the following correspond to what is in the API Console: Package Name: com.example.kontrollen, API Key: xxxxxxxxxxxxxx, Certificate Fingerprint: xxxxxxxxxxxxxxxxxxxxxxx

そして、これは私のグーグルアカウントです: ここに画像の説明を入力

私にできることはありますか?

これは私の AndroidManifest です:

  <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.kontrollen"
    android:versionCode="1"
    android:versionName="1.0" >
<permission android:name="com.example.kontrollen.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
<uses-permission android:name="com.example.kontrollen.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.INTERNET" />
<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="android.permission.INTERNET" />
    <uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="xxxxxxxxxxxxxxxxxxxxxxxxxxx" />
    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.example.kontrollen.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>
    </application>

</manifest>
4

5 に答える 5

8

アプリをアンインストールし、プロジェクト フォルダーをクリーンアップすることで問題を解決しました。私は何も変えませんでした。ご協力ありがとうございました。

于 2013-06-14T14:01:30.070 に答える
1

この手順に従って、エラーを自分でトレース してください エラーの種類の手順

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>

1.上記のように、マニフェストでインターネットまたは gsf リーダーのアクセス許可を確認します。
2.マニフェストで使用したパッケージ名を確認します。
3. API コンソールで、開始したサービスを確認しますGoogle Maps Android API v2
4. ライブラリ Google Play サービスがインポートされているかどうかを確認します。5. 解決策が機能しない場合は、このリンク ( https://developers.google.com/maps/documentation/android/start )
に従って新しい方法を試して ください。

6. sha1 を生成するための keytool コマンドも使用し
ました。

于 2013-06-14T12:37:22.157 に答える
1

URLに従って、アプリのGoogle APIキーを作成します。最近これを行いました..そして成功しました。

https://code.google.com/apis/console/ ------------ Google API の場合
https://developers.google.com/maps/documentation/android/start ---- -------- クレートマップ

これらのページを注意深く読んでください.このページに記載されているすべてのこと..同じ手順に従いますが、正しいSHA1フィンガープリントを生成したことを確認してください.

アプリをクレートするときは、実際のデバイスで実行してください。これを実行するには Google Play サービスが必要です。アプリケーションに Google Pay サービスを追加します。

于 2013-06-14T12:03:27.310 に答える