[英]I'm getting "Error: No resource found that matches the given name (at value with value @integer/google_play_services_version)"
[英]Getting error "No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version')" in Android Eclipse
我正在尝试使用 Eclipse运行一个android 项目,不幸的是,我收到错误消息“找不到与给定名称匹配的资源(在‘值’,值为‘@integer/google_play_services_version’)”。
为了解决这个问题,我做了以下
尝试复制“/extras/google/google_play_services/libproject/google-play-services_lib library project”,但根据我在最新版本的android中的理解,“google-play-services_lib”被分解为“/”下的多个库extras/google/m2repository/com/google/android/gms”。
我将“/extras/google/m2repository/com/google/android/gms”复制到我的 eclipse 工作区中。
重新启动eclipse并尝试从项目选择中添加“请选择一个库项目”但它被隐藏了。
提前致谢
您有两种方法可以解决此错误。
转到google-play-services_lib/res/values/version.xml 中的文件并查看该符号的原始整数:
<integer name="google_play_services_version">4030599</integer>
将其替换为AndroidManifest.xml :
<meta-data
android:name="com.google.android.gms.version"
android:value="4030599"/>
Eclipse -> 导入 -> 现有的 android 代码 -> 浏览 -> 导航到 google-play-services_lib 文件夹(android-sdk/extras/google/google_play_services/libproject)。
然后在您的项目控制中单击 ->
属性 -> android -> 库,添加 -> 选择刚刚导入的项目 -> ok
我希望它对你有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.