简体   繁体   中英

Xamarin Resource.designer.cs not generating reference for newly add file

I am adding a file called citybase.png to my drawable folder when I set the src property of my ImageView to @drawable/citybase the image is not showing up in the design view. Inspecting the Resource.designer.cs class I realize that no reference is being generated for any files I add to the drawable folder(except for the default Icon of course).

    public partial class Drawable
    {

        // aapt resource value: 0x7f020000
        public const int Icon = 2130837504;

        static Drawable()
        {
            global::Android.Runtime.ResourceIdManager.UpdateIdValues();
        }

        private Drawable()
        {
        }
    }

I tried rebuilding and cleaning the project but that does not work. How can I fix this problem? (Xamarin Studio 4.2.3)

可绘制文件夹名称应为小写(在Visual Studio中,它在创建项目时始终使用名称'Drawable'创建),也避免使用诸如'@','#'等符号。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM