Agu*_*lem 4 android google-play-services google-maps-android-api-2
我正在使用Android Studio制作Android程序.打开Android Studio和Gradle进程完成后,我得到了
错误:(50,28)找不到与给定名称匹配的资源(在'value'处,值为'@ string/google_maps_key')".
怎么了?这是我第一次遇到这个错误.
尽管这个问题是在几年前,但我会为其他人的利益添加答案.您应该看到一个名为/src/debug/res/values/google_maps_api.xml的文件(在下面复制),该文件中有生成和添加地图密钥的说明.用您的密钥替换字段YOUR_KEY_HERE.
To get one, follow this link, follow the directions and press "Create" at the end:
Once you have your key (it starts with "AIza"), replace the "google_maps_key"
string in this file.
-->
<string name="google_maps_key" templateMergeStrategy="preserve" translatable="false">
YOUR_KEY_HERE
</string>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3038 次 |
| 最近记录: |