Baseflow / Baseflow/LottieXamarin

You must set an images folder before loading an image exception

Open
#329 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.2k
Forks
253
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Research direction

Reproduce the Android Xamarin.Forms failure in version 4.0.9 using the working and failing Lottie files linked in the issue, then trace AnimationView's asset-loading entry point. Compare how the two JSON files are handled and confirm the fix by loading both files without the images-folder exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, csharp
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.