Baseflow / LottieXamarin

Render After Effects animations natively on Android, iOS, MacOS and TvOS for Xamarin
https://baseflow.com
Apache License 2.0
1.22k stars 261 forks source link

You must set an images folder before loading an image exception #329

Open Sergisoft opened 3 years ago

Sergisoft commented 3 years ago

On a Xamarin.Forms project for Android there's an AnimationView where the animation property is a lottie json of about 14Kb. In the same assets folder I have other 2 lottie json files of about 3Kb each. All the files are "Build Action" = "AndroidAsset".

If I debbug the project using the 14Kb file, all works fine. However, if I debbug the same project for any of the two 3Kb files, it throws the error "You must set an images folder before loading an image".

The animation parameter is set by hard-coding the json file name on the xaml file. The only difference I can see is just the file I use. That's why I'm giving so many details about.

In case anyone wants to try with same files:

This one works: https://lottiefiles.com/40059-packing

This one does not: https://lottiefiles.com/31401-falling-open-box

Version: 4.0.9

Platform:

Sergisoft commented 3 years ago

I found the files that don't work have assets within the json. Is there any way on lottie to know if a file has internal assets before downloading?