-
Notifications
You must be signed in to change notification settings - Fork 24
Google IO Android Lottie Animations - Bad state: No element #28
Comments
Ahhh. This throws a bad exception because of using |
Similar comment as before - this is likely fixable, but right now I'd prefer to focus my Lottie related efforts on the rewrite rather than fixing this code, which really needs a bit of work. |
Sounds like then rewrite first, but these might be good test files given the high profile of the Google IO app and making sure the package is robust enough to handle most Lottie files. Any suggestions in the meantime? like any way I might review or 'clean' the actual .json files to work with the current 0.2.0 package version? |
The bug listed here is related to trim paths - if the file has those it seems like it may have issues - although there are definitely some files that work. Unfortunately you probably won't do better than just inspecting the animation in the sample app right now. |
Ok diving into this a little further and after checking Lottie json doco for Trim here: If I take one of the example Google IO files like 2.json and modify it to create a 2modified.json and based on the doco remove the 2 offending objects starting with "ty": "tm" from the json file, I can then use the 2modified.json without any issues. Both of these files attached for reference. I also confirmed that io18_logo.json seems fine because it has no such "ty": "tm" objects in the json file ie. no trims. But now the issue is that removing those trim objects from the json file fundamentally changes the look of the animation. But it might help you find a fix. |
Using the lottie_flutter package version 0.2.0 and some quite 'famous' Google IO 2018 app lottie animation files. Namely the count down digits here:
Google IO 2018 Open source lottie animation files
io18_logo.json seems fine, but the digits like 0.json throw:
The following StateError was thrown during paint():
Bad state: No element
Flutter Doctor:
[✓] Flutter (Channel stable, v1.2.1, on Mac OS X 10.14.4 18E226, locale en-AU)
• Flutter version 1.2.1 at /Users/gamma/Documents/flutter
• Framework revision 8661d8aecd (9 weeks ago), 2019-02-14 19:19:53 -0800
• Engine revision 3757390fa4
• Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/gamma/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = /Users/gamma/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 10.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.2, Build version 10E125
• ios-deploy 1.9.4
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.4)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 34.0.2
• Dart plugin version 183.5901
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
[✓] VS Code (version 1.33.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 2.25.1
[✓] Connected device (1 available)
• Nexus 6P • CVH7N15A17000241 • android-arm64 • Android 8.1.0 (API 27)
• No issues found!
The text was updated successfully, but these errors were encountered: