Correct signature not found error

Hi, I'm trying to get some event triggers working to move between screens. I'm currently getting an error of
"Error Position 12:33. EventHandler "OnTap" with a correct signature not found in type "UniversalMemo.Views.Page.FolderPage"

I've looked around on the net and haven't found anything that helped. I removed the x:class reference to FolderPage but the app then hard crashes on the emulator.

I've cleaned the build many times.
I have a factory reset and rebuild the android emulator multiple times. (I've also done both the above step and this one at the same time)
I think this code may have been working before I did a Visual studio and Xamarin update or 2 ago. I'm not sure what to do to fix this right now other than starting a new project and importing this one into it.

Below is the code

XAML

<?xml version="1.0" encoding="utf-8" ?>

<ContentPage.ToolbarItems>
    <ToolbarItem Text="Add" Clicked="OnTap" />
</ContentPage.ToolbarItems>

...etc...

C#

    protected async void OnTap(object sender, EventArgs e)
    {
       await Navigation.PushModalAsync(new NavigationPage(new NewFolderPage()));
    }

Answers

  • JarvanJarvan Member, Xamarin Team Xamurai

    I've reproduced the code and it works on my side. Would you mind sharing a basic demo to reproduce the issue to get a solution? And have you tried to create a new page to test the code?

  • CraigHaywardCraigHayward AUMember ✭✭

    Thanks.

    I created a new project and had the same error as above (plus a DLL issue for some reason) I ended up deleting the .suo file and it fixed the error. I tried this in my main project and I had pretty much the same areas (including DLL, It's being dumped in a different path than VS is expecting and last time I just moved it manually) I deleted the SUO and it didn't resolve the issue. Currently, I'm reinstalling VS to see if that will fix the issue.

  • JarvanJarvan Member, Xamarin Team Xamurai

    A basic sample works on my side, you can test it on your VS.

  • CraigHaywardCraigHayward AUMember ✭✭

    Yep that project worked fine after I fixed a few things. I'm going to have to reimport my project by the sounds of it. Thanks

  • JarvanJarvan Member, Xamarin Team Xamurai

    If the reply solved your issue, please mark the helpful reply as answer. If you are facing some issues while implementing, try to post the particular error with the corresponding codes here.

  • CraigHaywardCraigHayward AUMember ✭✭

    Unfortunately it's not solved. I just started a new project and imported my code in and it still has the same 2 errors. Pop up as I connecting things back up.

  • JarvanJarvan Member, Xamarin Team Xamurai

    Would you mind sharing a basic demo to reproduce the issue? And does a new blank project work well on your side?

Sign In or Register to comment.