未找到Google Play组件的可绘制资源文件

use*_*779 0 xml android xamarin visual-studio-2012 android-drawable

我之前一直在使用Xamarin Studio对Google Maps应用程序进行编码,并将文件复制到Visual Studio中使用的新文件夹中.

在Visual Studio中构建Android应用程序时,我收到的所有资源错误都与Google Play组件有关.

这是一个错误:

No resource found that matches the given name (at 'drawable' with value '@drawable/common_signin_btn_icon_pressed_dark')
Run Code Online (Sandbox Code Playgroud)

这是XML文件:

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:state_pressed="true"
        android:drawable="@drawable/common_signin_btn_icon_pressed_dark" />
    <item
        android:state_enabled="false"
        android:state_focused="true"
        android:drawable="@drawable/common_signin_btn_icon_disabled_focus_dark" />
    <item
        android:state_focused="true"
        android:drawable="@drawable/common_signin_btn_icon_focus_dark" />
    <item
        android:state_enabled="false"
        android:drawable="@drawable/common_signin_btn_icon_disabled_dark" />
    <item
        android:drawable="@drawable/common_signin_btn_icon_normal_dark" />
</selector>
Run Code Online (Sandbox Code Playgroud)

这些资源文件在代码中有多重要?我可以删除XML文件中的引用吗?

提前致谢

sil*_*age 5

我可能会迟到,并且真诚地希望你现在已经弄清楚这一点,但对于像我这样经历过这个问题的人并发现Google上的帖子可能会发现它很有用.

答案很简单: 在确保不会达到文件路径错误的最大大小后,卸载软件包(或组件)并重新安装.这应该修复缺少的资源.

我有使用Xamarin Studio的类似经历.最初文件路径对于Windows(可能是其他操作系统)来说太长了,并且包下载的zip不会解压缩.IDE提示我手动下载zip,并将其解压缩到适当的位置.这根本不够,因为我遇到了同样的错误.我重命名了几个文件夹以允许包含所涉及的荒谬的子目录命名,并且在重新安装复制后我收到了同样的错误.

删除软件包并重新下载/安装软件包后,项目已构建,并且没有丢失的可绘制资源.

相关来源: 找不到与common_signin_btn_icon_dark.xml中给定名称匹配的资源 http://forums.xamarin.com/discussion/comment/65525/#Comment_65525