LottieXamarin icon indicating copy to clipboard operation
LottieXamarin copied to clipboard

You must set an images folder before loading an image exception

Open Sergisoft opened this issue 4 years ago • 1 comments

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:

  • [ ] :iphone: iOS
  • [ ] :robot: Android
  • [ ] :checkered_flag: WPF
  • [ ] :earth_americas: UWP
  • [ ] :apple: MacOS
  • [ ] :tv: tvOS
  • [x] :monkey: Xamarin.Forms

Sergisoft avatar May 07 '21 04:05 Sergisoft

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?

Sergisoft avatar May 07 '21 04:05 Sergisoft