【问题标题】:Getting error "No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version')" in Android Eclipse在 Android Eclipse 中出现错误“找不到与给定名称匹配的资源(在 'value' 处,值为 '@integer/google_play_services_version')”
【发布时间】:2021-01-22 00:31:09
【问题描述】:

我正在尝试使用 Eclipse 运行 android 项目,不幸的是,我收到错误消息“未找到与给定名称匹配的资源(在 'value' 处,值为 '@integer/google_play_services_version ')"。

为了解决这个问题,我做了以下操作

  1. 尝试复制“/extras/google/google_play_services/libproject/google-play-services_lib 库项目”,但根据我在最新版本的 android 中的理解,“google-play-services_lib”被分解为多个库,即在“/extras/google/m2repository/com/google/android/gms”下。

  2. 我将“/extras/google/m2repository/com/google/android/gms”复制到我的 Eclipse 工作区。

  3. 重启eclipse并尝试从项目选择中添加“请选择一个库项目”,但它被隐藏了。

    请找到错误的附件

提前致谢

【问题讨论】:

    标签: android eclipse google-play


    【解决方案1】:

    您有两种方法可以解决此错误。

    1. 转到 google-play-services_lib/res/values/version.xml 的文件并查看该符号的原始整数:

      4030599

    将其替换为 AndroidManifest.xml

    <meta-data
       android:name="com.google.android.gms.version"
       android:value="4030599"/>
    
    1. 转到

    Eclipse -> 导入 -> 现有的 android 代码 -> 浏览 -> 导航到 google-play-services_lib 文件夹 (android-sdk/extras/google/google_play_services/libproject)。

    然后在你的项目控件中点击 ->

    properties -> android -> libraries,添加 -> 选择刚刚导入的项目 -> ok

    我希望它对你有用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-11-04
      • 1970-01-01
      • 2015-06-16
      • 2017-05-15
      • 1970-01-01
      • 2014-07-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多