Xmarin.Forms.Xaml.XamlParseException no method fou

2019-09-16 12:14发布

问题:

Here is my code

<?xml version="1.0" encoding="utf-8" ?> 
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" 
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
             x:Class="App3.Page2" 
             Title="Welcome to the second page!!!"> 
    <ContentPage.Content> 
        <ScrollView> 
            <StackLayout> 
                <Grid> 
                    <Grid.RowDefinitions> 
                        <RowDefinition Height="3*"/> 
                        <RowDefinition Height="3*"/> 
                        <RowDefinition Height="*"/> 
                    </Grid.RowDefinitions> 
                    <Editor x:Name="fstN" 
                            Text="Enter 1st number" 
                            Grid.Row="0" 
                            Grid.Column="0" 
                            Grid.ColumnSpan="2" 
                            HorizontalOptions="Fill" 
                            VerticalOptions="Fill" 
                            TextChanged="fstNTextChanged"/> 
                    <Editor x:Name="scndN" 
                            Text="Enter 2nd number" 
                            Grid.Row="0" 
                            Grid.Column="2" 
                            Grid.ColumnSpan="2" 
                            HorizontalOptions="Fill" 
                            VerticalOptions="Fill" 
                            TextChanged="scndNTextChanged"/> 
                    <Button x:Name="plusButton" 
                            Text="+" 
                            Grid.Row="1" 
                            Grid.Column="0" 
                            HorizontalOptions="Fill" 
                            VerticalOptions="Fill" 
                            Clicked="plusButtonCicked"/> 
                    <Button Text="-" 
                            Grid.Row="1" 
                            Grid.Column="1" 
                            HorizontalOptions="Fill" 
                            VerticalOptions="Fill" 
                            /><!--Clicked="minusBtnCicked"/>--> 
                    <Button Text="/" 
                            Grid.Row="1" 
                            Grid.Column="2" 
                            HorizontalOptions="Fill" 
                            VerticalOptions="Fill" 
                            /><!--Clicked="ratioBtnCicked"/>--> 
                    <Button Text="*" 
                            Grid.Row="1" 
                            Grid.Column="3" 
                            HorizontalOptions="Fill" 
                            VerticalOptions="Fill" 
                            /><!--Clicked="productionBtnCicked"/>--> 
                    <Label x:Name="lblAns" 
                            Text="Answer" 
                            Grid.Row="2" 
                            Grid.ColumnSpan="4" 
                            HorizontalOptions="Fill" 
                            VerticalOptions="Fill"/> 
                </Grid> 
            </StackLayout> 
        </ScrollView> 
    </ContentPage.Content> 
</ContentPage>

I have commented the click events of all buttons except one just to show and there is an error, sounds like "Xamarin.Forms.Xaml.XamlParseException: No method plusButtonClicked found on type App3.Page2" Any ideas about what is this?