[英]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.