Why doesn't AnimationViewRenderer exist in the context error when trying to add Lottie animation in Xamarin forms Android project's MainActivity.cs? I am using Visual Studio 2017.
Try to downgrade from 2.7.0 to 2.6.3
After installing Lottie version 3.1.2 for Xamarin.Forms I had the same issue. The reason was that this specific version of Lottie has a dependency on Mono runtime version 10 but my Android project was Mono version 9. So once I upgraded MonoAndroid to 10, everything was working fine and I could use AnimationViewRenderer.Init()
. However, I did not even need to initialize AnimationViewRenderer
; I just add the Lottie XAML component to my page and it is working perfectly.
You can check what version of Mono your Lottie requires by going to NuGet package manager, selecting the package and underneath Dependencies
you should be able to see the required MonoAndroid version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With