Issue
When i tried to load gif to my project suddenly return me error:
Java.Lang.IllegalStateException: 'Unable to parse composition'
Image for more information link
I want to insert gif to my project I tried to use Lottie and Json File
My code so far
<forms:AnimationView
x:Name="animationView"
Grid.Row="1"
Animation="first.json"
Loop="false"
AutoPlay="false"/>
Solution
Please add xmlns:lottie="clr-namespace:Lottie.Forms;assembly=Lottie.Forms"
to your XAML head and use this component
<lottie:AnimationView
x:Name="AnimationView"
Animation="first.json"
AutoPlay="True" Loop="true"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand" />
and dont forget to init AnimationViewRenderer.Init();
on MainActivity and AppDelegate
Answered By - Guilherme Nimer
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.