我正在学习本教程:https://developers.google.com/maps/documentation/android/start#overview 关于如何将 Google map 添加到 Android SDK 中的应用程序。
我似乎遇到的唯一问题是在这段时间(我已经完成了其他所有操作,没有任何错误):
Edit your application's AndroidManifest.xml file, and add the following declaration within the
<application> element. This embeds the version of Google Play services that the app was compiled with.
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
The error is:
No resources found that match the given name (at 'value' with value '@integer/
google_play_services_version').
我已经尝试按照这个人对同一问题的解决方案:Google Play Services Library update and missing symbol @integer/google_play_services_version
但我仍然遇到同样的错误。有什么帮助吗?
最佳答案
可能是您的库未正确链接到项目,或者您的 google-play-services 库版本较旧,因此出现冲突并且 Eclipse 变得愚蠢..:S
不,您不需要在 integers.xml 中添加任何内容。当您将 Google-play-services 库正确链接到您的项目引用 android:value="@integer/google_play_services_version"
后,您就可以开始使用了。当您将库添加到您的项目中时,只需再做一个干净如此有趣的 Eclipse 环境即可正确清除。
如果您在下一个播放版本到来时将此数字硬编码在某个地方,则需要对其进行更新。如果您忘记了这一点,您将再次花时间寻找错误..:S
希望它有所帮助。 ;)
关于android - 将 Google Play 服务版本添加到您的应用 list ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19879844/