android - 将 Google Play 服务版本添加到您的应用 list ?

标签 android google-maps-android-api-2 google-play-services

我正在学习本教程: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/

相关文章:

android - 如何完整显示标题名称(未截断)以及如何将菜单元素放置在底部的操作栏中?

android - 谷歌地图 - 制作类似抓取应用程序的动画来显示路径方向

android - 在 Android Google Maps API v2 中实现覆盖的建议方法是什么?

android - 未经许可使用 Google Maps API MapView

android - 在 Activity 之间保留 Google Play 服务登录

android - 库 com.google.android.gms :play-services-basement is being requested by various other libraries at [[15. 0.1,15.0.1]],但解析为 16.0.1

android - 自定义可绘制角度android

android - ListFragment 中的项目不会显示在使用自定义数组适配器的 Listview 中

java - 更改其他 Activity 的 TextView 时出现错误

使用 API key 限制时 Android SafetyNet API 失败