No resource found that matches the given name in common_signin_btn_icon_dark.xml

跟風遠走 提交于 2019-12-07 06:50:20

问题


I am developing a MonoGame app (C#) for Android using Xamarin Android in VS2012. Everything was going well then on a particular build I suddenly started getting 4 similar errors for no apparent reason. These errors all originate from the Google Play component found in the Xamarin component store:

No resource found that matches the given name (at 'drawable' with value '@drawable/common_signin_btn_icon_disabled_focus_dark').
No resource found that matches the given name (at 'drawable' with value '@drawable/common_signin_btn_icon_disabled_focus_light').
No resource found that matches the given name (at 'drawable' with value '@drawable/common_signin_btn_text_disabled_focus_dark').
No resource found that matches the given name (at 'drawable' with value '@drawable/common_signin_btn_text_disabled_focus_light').

These all occur within

Components\googleplayservicesgingerbread-16.0.0.1\lib\android\16\content\google-play-services\libproject\google-play-services_lib\res\drawable\common_signin_btn_text_light.xml

I am not sure what triggered these errors to suddenly popup after I have been using this component for a while. I also don't know how to get rid of them.

My project compiles using Android version 2.3, API Level 10. The min target is also v2.3 API level 10, and the target version is set to v4.4 API 19.


回答1:


This seems to be a path issue, could you move your project as close to c:\ root to see if that helps.

You are likely to hit the maximum path length on windows.




回答2:


Go to the Components\googleplayservicesgingerbread-16.0.0.1\lib\android and delete (or rename) the 16 folder. When you rebuild the content will be downloaded again and the files should be there.

I would keep this project closer to the root of your disk. MAX_PATH issues are common when using the GooglePlay component.

I can not imagine why these four files are missing, but once you replace them it should work.

  • Xamarin support email that fixed the issue



回答3:


This tends to happen when the user hits the maximum path error.

After ensuring the maximum file path will not be exceeded, uninstall and re-install the package (or component).

See my answer here

Note: - I would have added this as a comment to your answer which guided me to my solution, but currently lack the reputation as I'm typically a troller rather than poster.




回答4:


You may want to compile the app using Android 4.3+ and set minimum target version to v2.3 API Level 10



来源:https://stackoverflow.com/questions/24249787/no-resource-found-that-matches-the-given-name-in-common-signin-btn-icon-dark-xml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!