How to solve "'Resource' is ambiguous" error...

In the new version (0.36.1) I get this error:

![file](https://s3.us-east-2.amazonaws.com/fuse-legacy-forum-assets/FglKD64luO0e-image-1492458421467.46.46 PM.png)

My code is:

using Uno;
using Uno.Collections;
using Fuse;
using Fuse.Scripting;
using Fuse.Reactive;
using Uno.UX;

using Uno.Compiler.ExportTargetInterop;


[ForeignInclude(Language.Java, "android.webkit.CookieManager", "android.os.Build", "android.webkit.ValueCallback", "android.util.Log")]
[ForeignInclude(Language.ObjC, "Foundation/Foundation.h")]
[Require("Xcode.Framework", "Foundation")]
[UXGlobalModule]
public class ClearCookies : NativeModule
{
    static readonly ClearCookies _instance;
    public ClearCookies()
    {
        if(_instance != null) return;
        Resource.SetGlobalKey(_instance = this, "ClearCookies");
        AddMember(new NativeFunction("ClearTheC",
            (NativeCallback)ClearTheC));
    }

    object ClearTheC(Context c, object[] args)
    {
        clearTheC();
        return null;
    }

    [Foreign(Language.ObjC)]
    public static extern(iOS) void clearTheC()
    @{
        NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
        for (NSHTTPCookie *cookie in [storage cookies]) {
           [storage deleteCookie:cookie];
        }
        [[NSUserDefaults standardUserDefaults] synchronize];
    @}

    [Foreign(Language.Java)]
    public static extern(Android) void clearTheC()
    @{
        android.webkit.CookieManager.getInstance().setCookie(".facebook.com", "locale=");
        android.webkit.CookieManager.getInstance().setCookie(".facebook.com", "datr=");
        android.webkit.CookieManager.getInstance().setCookie(".facebook.com", "s=");
        android.webkit.CookieManager.getInstance().setCookie(".facebook.com", "csm=");
        android.webkit.CookieManager.getInstance().setCookie(".facebook.com", "fr=");
        android.webkit.CookieManager.getInstance().setCookie(".facebook.com", "lu=");
        android.webkit.CookieManager.getInstance().setCookie(".facebook.com", "c_user=");
        android.webkit.CookieManager.getInstance().setCookie(".facebook.com", "xs=");
    @}
    
    public static extern(!mobile) void clearTheC() {}
}

How can I fix this?

Thanks!

Hi Cristian,

change Resource to Uno.UX.Resource

Hi, I replace Resource to Uno.UX.Resource but I get the same error…

Making changes to Uno code generally requires you running ‘uno clean’ and restarting preview / rebuilding the app. Hope that helps.