Android 没有找到资源@integer/google_play_services_version 这是什么?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24325333/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 08:01:55  来源:igfitidea点击:

no resource found @integer/google_play_services_version whats this?

androidmetadataandroid-manifestgoogle-play-services

提问by Abhi

I have to Integrate Inmobi skd into my project I have gone through this https://www.inmobi.com/support/integration/23817448/22051163/android-sdk-integration-guide/tutorial and when I mentioned to androidmenidfest.xml file it gives an error No resource found that matches the given name (at 'value' with value '@integer/ google_play_services_version').

我不得不整合的InMobi SKD到项目中,我走过了这https://www.inmobi.com/support/integration/23817448/22051163/android-sdk-integration-guide/教程,当我提到androidmenidfest.xml文件它给出了一个错误没有找到与给定名称匹配的资源(在“值”处,值为“@integer/google_play_services_version”)。

to resolve this I have referred this I'm getting "Error: No resource found that matches the given name (at value with value @integer/google_play_services_version)"tutorial but it doesn't help me.. Please help me I am newbie in android.. Thanks in advance

为了解决这个问题,我已经提到了这个我收到“错误:找不到与给定名称匹配的资源(值@integer/google_play_services_version)”教程,但它对我没有帮助..请帮助我我是新手android .. 提前致谢

回答by Shylendra Madda

As told by Simple Plan do like:

正如 Simple Plan 所说的那样:

In Eclipse:

在日食中:

Eclipse -> import -> existing android code -> browse -> navigate to google-play-services_lib FOLDER (android-sdk/extras/google/google_play_services/libproject).

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

then, select your project--> right click -> properties -> android -> libraries, add -> select the project you just imported -> OK

然后,选择您的项目--> 右键单击​​-> 属性-> android -> 库,添加-> 选择您刚刚导入的项目-> 确定

UPDATE:

更新:

In Android Studio:

在 Android Studio 中:

Simply add this line to build.gradleand click on Sync

只需将此行添加到build.gradle并单击同步

compile 'com.google.android.gms:play-services:8.4.0'

编译 'com.google.android.gms:play-services:8.4.0'

And also make sure to add this line at end of the build.gradle (I have no clue why putting this at the end (and not at the beginning ) solves the error.)

并且还要确保在 build.gradle 的末尾添加这一行(我不知道为什么把它放在最后(而不是在开头)解决了错误。)

apply plugin: 'com.google.gms.google-services'

应用插件:'com.google.gms.google-services'

For more info refer thislink

有关更多信息,请参阅链接