Xamarin.Forms.CarouselView 抛出异常

Xamarin.Forms.CarouselView exception thrown

我正在尝试使用 CarouselView 创建滑块 class,但出现此异常,我不知道为什么:

System.MissingMethodException = 未找到方法:void Xamarin.Forms.CarouselView.set_IndicatorView(Xamarin.Forms.IndicatorView).

我已经在 MainActivity.cs

中设置了 Forms.SetFlags("IndicatorView_Experimental")

代码如下:

<StackLayout>
            <CarouselView x:Name="guidaView" IndicatorView="indicatorView" ItemsSource="{Binding Items}">
                <CarouselView.ItemTemplate>
                    <DataTemplate>
                        <StackLayout>
                            <Label Text="{Binding Title}" FontSize="Large" FontAttributes="Bold"/>
                            <Label Text="{Binding Subtitle}" FontSize="Small" FontAttributes="Italic"/>
                            <Image Source="{Binding ImageSource}"/>
                        </StackLayout>
                    </DataTemplate>
                </CarouselView.ItemTemplate>
            </CarouselView>
            <IndicatorView x:Name="indicatorView" 
                       IndicatorsShape="Square"
                       IndicatorColor="LightGray"
                       SelectedIndicatorColor="DarkGray"
                       HorizontalOptions="Center"
                       Margin="0,0,0,40" />
        </StackLayout>

我正在使用 Xamarin.Forms(4.6.0.847 版本)和 Xamarin.Essentials (1.5.3.2)

已解决:xamarin.forms包的版本在Project.Android

中没有更新