简体   繁体   English

如何修复“找不到与给定名称匹配的资源('value'与值'@ integer / google_play_services_version')”

[英]How to fix “No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version')”

I am getting the following error when I build my Android App project in Visual studio 2015. 我在Visual Studio 2015中构建我的Android App项目时收到以下错误。

No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version') 找不到与给定名称匹配的资源('value'的值为'@ integer / google_play_services_version')

These lines are located under: 这些行位于:

obj\Debug\android\manifest\AndroidManifest.xml

There is 3 entires of it inside the AndroidManifest file . AndroidManifest file有3个内容。

I have downloaded the google play service from the SDK Manager . 我已从SDK Manager下载了Google Play服务。

Should I reference anything to my solution? 我应该参考我的解决方案吗?

I already has Xamarin.GooglePlayServices.Base, Xamarin.GooglePlayServices.Basement, Xamarin.GooglePlayServices.Maps Referenced. 我已经有Xamarin.GooglePlayServices.Base, Xamarin.GooglePlayServices.Basement, Xamarin.GooglePlayServices.Maps参考。

Thanks. 谢谢。

你已经在value文件夹中创建了integer.xml文件,并将你的Integer定义到那个地方它将解决你的问题。

Try doing and a clean all and check that ALL the content under the obj has been deleted and then perform a build all. 尝试执行并清除所有内容并检查obj下的所有内容是否已删除,然后执行全部构建。

If that does not work: 如果这不起作用:

I would try removing the ~GooglePlayServices~ nugets/references and re-add just the Xamarin.GooglePlayServices.Maps nuget which will bring in the ~Basement and ~Base libraries. 我会尝试删除~GooglePlayServices~ nugets /引用,并重新添加只是 Xamarin.GooglePlayServices.Maps的NuGet将在带给~Basement~Base库。

You should end up with a generated manifest that only has one reference to google_play_services_version and that resource should be picked up from Debug/android/XXX/YYYYYY/ZZZZZ/R.java: 您应该得到一个生成的清单,该清单只有一个对google_play_services_version引用,并且该资源应该从Debug / android / XXX / YYYYYY / ZZZZZ / R.java中获取:

ie

public static final int google_play_services_version=0x7f070000;

I added several new packages. 我添加了几个新包。 One of the package is the reason of the error. 其中一个包是错误的原因。 I have to check one by one and caught the one causing error. 我必须逐个检查并发现导致错误的一个。 Removing that package is all I need to do to resolve the error. 删除该包是我解决错误所需要做的全部工作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何修复Xamarin android c#中的“找不到与给定名称(在'value'处与值'@ integer / google_play_services_version匹配)的资源” - How to fix“No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version)” in Xamarin android c# No Gradle - 找不到与给定名称匹配的资源('value'的值为'@ integer / google_play_services_version') - No Gradle - No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version') 找不到与给定名称匹配的资源(在“值”处与值“ @ integer / google_play_services_version”) - No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version') 未找到与给定名称匹配的资源(值与值 @integer/google_play_services_version)”- Visual Studio 2015 更新 3 - No resource found that matches the given name (at value with value @integer/google_play_services_version)” - Visual Studio 2015 Update 3 在Android Eclipse中出现错误“找不到与给定名称匹配的资源(在'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 我收到“错误:找不到与给定名称匹配的资源(值为@integer/google_play_services_version)” - I'm getting "Error: No resource found that matches the given name (at value with value @integer/google_play_services_version)" Android:找不到Admob资源@ integer / google_play_services_version - Android: Admob resource not found @integer/google_play_services_version 错误:找不到资源整数/ google_play_services_version(又名app:integer / google_play_services_version) - error: resource integer/google_play_services_version (aka app:integer/google_play_services_version) not found 找不到Android清单@ integer / google_play_services_version - Android manifest @integer/google_play_services_version not found 找不到google_play_services_version - google_play_services_version not found
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM