C# 为什么我的乐蒂动画没有';不以Xamarin的形式出现?

C# 为什么我的乐蒂动画没有';不以Xamarin的形式出现?,c#,android,xamarin.forms,lottie-android,C#,Android,Xamarin.forms,Lottie Android,我遵循了一个教程,由于某种原因,当我在Android设备上测试时,我的乐蒂动画没有显示出来 包Com.Airbnb.Lottie.Forms已添加到所有应用程序项目中(它是跨平台的) 然后将Com.Airbnb.Android.Lottie添加到Android应用程序中(首先,我尝试不使用它,也不起作用) 这是密码 <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns=&qu

我遵循了一个教程,由于某种原因,当我在Android设备上测试时,我的乐蒂动画没有显示出来

包Com.Airbnb.Lottie.Forms已添加到所有应用程序项目中(它是跨平台的) 然后将Com.Airbnb.Android.Lottie添加到Android应用程序中(首先,我尝试不使用它,也不起作用)

这是密码

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
             xmlns:lottie="clr-namespace:Lottie.Forms;assembly=Lottie.Forms"
             x:Class="AppWasher.MainPage">

    <StackLayout>
  
        <lottie:AnimationView
            x:Name="animationView"
            Animation="26617-ogad.json"
            RepeatMode="Restart"
            VerticalOptions="FillAndExpand"
            HorizontalOptions="FillAndExpand"
            WidthRequest="300"
            HeightRequest="300"/>
        
    </StackLayout>

</ContentPage>

这是洛蒂提供的指南

<forms:AnimationView
    x:Name="animationView"
    Animation="LottieLogo1.json"
    AnimationSource="AssetOrBundle"
    Command="{Binding ClickCommand}"
    RepeatCount="3"
    RepeatMode="Restart"
    VerticalOptions="FillAndExpand"
    HorizontalOptions="FillAndExpand" />

我也尝试过使用所有这些属性,同样的结果

我正在安卓9.0版本上测试

另外,json文件被添加到android项目的资产文件夹中,构建操作被设置为AndroidAsset

在我将android
目标框架
版本更改为
android 10.0
后,它对我有效

我发现最新的Lottie nuget依赖于AndroidX