1. 進入到Google APIs Console頁面
https://code.google.com/apis/console/
點選左邊導航欄的Seivices進入

在All services 的清單中找到Google Maps Android API 2 和
Google Play Android Developer API,把這幾個API都激活,也就是後面變成ON,第一次激活的時候可能會接受一些條款,接受就可以了
2.從電腦上得到密鑰
如下圖,debug.keystore在該目錄下。
接着進入dos,進到.android目錄,輸入keytool -list -alias androiddebugkey -keystore debug.keystore。
輸入密鑰庫密碼:android。
得到一個SHA1 的密鑰,複制下來
3. 申請API key
在Google APIs Console頁面中,選擇
點選Create new Android key建立一個新的key
在頁面中填寫自己電腦生成的SHA1密鑰以及要建的包然後點選Create就建立了一個新的API key