我正在致力於使用Google Maps API的Android項目。我已經生成了一個適當限制的密鑰,但我無法讓我的程序運行。我得到的錯誤是:
Error:(53, 28) No resource found that matches the given name (at 'value' with value '@string/google_maps_key').
我做了一些研究,我發現我需要改變@string/google_maps_key
到我的實際鍵。看下面的例子。注意標籤發射的事實。
前:
meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key"/
後:
meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyBY3c7RFvwzs06juEg0nzIU7PVERTIV3U8"/
我試圖使顯示的變化,但是當我跑我的程序自動更改回@string/google_maps_key
。
我必須做些什麼才能讓我的地圖應用程序正常運行?預先感謝任何有幫助的人。
進入'strings.xml'文件並將'google_maps_key'資源更改爲您的密鑰 – zgc7009