1.首先找到debug keystore位置:
打開Eclipse--->Windows--->Preferences--->Android--->Build
一般是這樣的路徑 C:\Documents and Settings\Administrator\.android\debug.keystore
2.在cmd中執行
keytool -list -alias androiddebugkey -keystore "C:\Documents and Settings\Administrator\.android\debug.keystore" -storepass android -keypass android -v
3.打開 http://code.google.com/intl/zh-CN/android/maps-api-signup.html
複製 認證指紋 (MD5):到下面的 My certificate's MD5 fingerprint
4.然後點擊 Generate Api key
感謝您註冊 Android 地圖 API 密鑰! 您的密鑰是: 0vDJgxtrB71gl2bwGRP2mPrW5jfSxeTno0xDyVw 此密鑰適用於所有使用以下指紋所對應證書進行驗證的應用程序: 33:27:0C:5F:63:4D:E2:D2:8A:E6:E2:5B:F8:86:6E:C5 下面是一個 xml 格式的示例,幫助您瞭解地圖功能: <com.google.android.maps.MapView android:layout_width= "fill_parent" android:layout_height= "fill_parent" android:apiKey= "0vDJgxtrB71gl2bwGRP2mPrW5jfSxeTno0xDyVw" /> |