0

誰かがドキュメントについて持っていました、私は私の最後の試験のためにGoogle Maps APIについてのプロジェクトを準備しているので、GoogleMapsAPIについてのカリキュラムは私を共有することができました。私はdeveloper.android.comでグーグルマップAPIについてのガイドを見つけることができることを知っていますが、私は理解していません

誰かがドキュメントを持っていました、GoogleMapsAPIに関するカリキュラムは私を共有することができます

4

2 に答える 2

0

まず、システムで debug.keystore を見つけます

あなたはここでそれを見つけるでしょう

Windows Vista: C:\Users\<user>\.android\debug.keystore
Windows XP: C:\Documents and Settings\<user>\.android\debug.keystore
OS X and Linux: ~/.android/debug.keystore

それから

コマンドラインでこのコマンドを起動します

$ keytool -list -alias androiddebugkey \
-keystore <path_to_debug_keystore>.keystore \
-storepass android -keypass android

出力としてmd5キーを取得します

これをクリックする必要があります

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

この手順に従ってください

If you don't have a Google account, use the link on the page to set one up.
Read the Android Maps API Terms of Service carefully. If you agree to the terms, indicate so using the checkbox on the screen.
Paste the MD5 certificate fingerprint of the certificate that you are registering into the appropriate form field.
Click "Generate API Key"

生成されたキーをコードに追加します

<com.google.android.maps.MapView
 android:layout_width="fill_parent"
 android:layout_height="fill_parent"
 android:enabled="true"
 android:clickable="true"
 android:apiKey="example_Maps_ApiKey_String"
 />

これも追加

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
 package="com.example.package.name">
 ...
 <application android:name="MyApplication" >
   <uses-library android:name="com.google.android.maps" />
 ...
 </application>

それでおしまい

于 2012-11-06T11:03:07.323 に答える