cameronstuartsmith / flutter_lottie Goto Github PK
View Code? Open in Web Editor NEWUse lottie in flutter for both iOS and Android
License: Apache License 2.0
Use lottie in flutter for both iOS and Android
License: Apache License 2.0
Hi,
Giving exception when i try to use it in android
Crash will appear when playing some animations in Android. According to the instructions on lottie-android, version 3.0 or above is required
hitTestBehavior: PlatformViewHitTestBehavior.transparent,
The animations always have a white background in Android and are transparent in iOS. This isn't noticeable in the example project since the entire background is white. If you change the scaffold background color in the example project, you will see what I mean. Any ideas on how to fix this?
Why can't the third animation show up when my page has more than two animations?
Currently experiencing null safety issues with this library
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
- package:flutter_lottie
error: compiling for
iOS 8.0, but module 'Lottie' has a minimum deployment target of iOS 9.0:
App crashes with the following logs:
E/AndroidRuntime(11357): java.lang.IllegalStateException: Unable to parse composition
E/AndroidRuntime(11357): at com.airbnb.lottie.LottieAnimationView$2.onResult(LottieAnimationView.java:68)
E/AndroidRuntime(11357): at com.airbnb.lottie.LottieAnimationView$2.onResult(LottieAnimationView.java:66)
E/AndroidRuntime(11357): at com.airbnb.lottie.LottieTask.notifyFailureListeners(LottieTask.java:167)
E/AndroidRuntime(11357): at com.airbnb.lottie.LottieTask.access$300(LottieTask.java:26)
E/AndroidRuntime(11357): at com.airbnb.lottie.LottieTask$1.run(LottieTask.java:142)
E/AndroidRuntime(11357): at android.os.Handler.handleCallback(Handler.java:873)
E/AndroidRuntime(11357): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(11357): at android.os.Looper.loop(Looper.java:193)
E/AndroidRuntime(11357): at android.app.ActivityThread.main(ActivityThread.java:6669)
E/AndroidRuntime(11357): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(11357): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/AndroidRuntime(11357): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
E/AndroidRuntime(11357): Caused by: java.io.FileNotFoundException: flutter_assets/assets/lottie animations/splashscreen.json
E/AndroidRuntime(11357): at android.content.res.AssetManager.nativeOpenAsset(Native Method)
E/AndroidRuntime(11357): at android.content.res.AssetManager.open(AssetManager.java:744)
E/AndroidRuntime(11357): at android.content.res.AssetManager.open(AssetManager.java:721)
E/AndroidRuntime(11357): at com.airbnb.lottie.LottieCompositionFactory.fromAssetSync(LottieCompositionFactory.java:100)
E/AndroidRuntime(11357): at com.airbnb.lottie.LottieCompositionFactory$1.call(LottieCompositionFactory.java:81)
E/AndroidRuntime(11357): at com.airbnb.lottie.LottieCompositionFactory$1.call(LottieCompositionFactory.java:79)
E/AndroidRuntime(11357): at java.util.concurrent.FutureTask.run(FutureTask.java:266)
E/AndroidRuntime(11357): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/AndroidRuntime(11357): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/AndroidRuntime(11357): at java.lang.Thread.run(Thread.java:764)
-> Fetching podspec for mark922_flutter_lottie
from .symlinks/plugins/mark922_flutter_lottie/ios
[!] No podspec found for mark922_flutter_lottie
in .symlinks/plugins/mark922_flutter_lottie/ios
how to set images folder?
Please increase support to Lottie 3.x
Animation crash in Android.
Android version:
Android 9
Platform:
Emulator x86, Pixel 3XL
Error Stacktrace:
Animation contains merge paths. Merge paths are only supported on KitKat+ and must be manually enabled by calling enableMergePathsForKitKatAndAbove().
W/LOTTIE ( 5475): Animation contains merge paths but they are disabled.
D/AndroidRuntime( 5475): Shutting down VM
E/AndroidRuntime( 5475): FATAL EXCEPTION: main
E/AndroidRuntime( 5475): Process: com.example.hmlet_internal_sales, PID: 5475
E/AndroidRuntime( 5475): java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List com.airbnb.lottie.model.content.ShapeData.getCurves()' on a null object reference
E/AndroidRuntime( 5475): at com.airbnb.lottie.model.content.ShapeData.interpolateBetween(ShapeData.java:55)
E/AndroidRuntime( 5475): at com.airbnb.lottie.animation.keyframe.ShapeKeyframeAnimation.getValue(ShapeKeyframeAnimation.java:23)
E/AndroidRuntime( 5475): at com.airbnb.lottie.animation.keyframe.ShapeKeyframeAnimation.getValue(ShapeKeyframeAnimation.java:11)
E/AndroidRuntime( 5475): at com.airbnb.lottie.animation.keyframe.BaseKeyframeAnimation.getValue(BaseKeyframeAnimation.java:125)
E/AndroidRuntime( 5475): at com.airbnb.lottie.animation.content.ShapeContent.getPath(ShapeContent.java:61)
E/AndroidRuntime( 5475): at com.airbnb.lottie.animation.content.FillContent.draw(FillContent.java:88)
E/AndroidRuntime( 5475): at com.airbnb.lottie.animation.content.ContentGroup.draw(ContentGroup.java:161)
E/AndroidRuntime( 5475): at com.airbnb.lottie.animation.content.ContentGroup.draw(ContentGroup.java:161)
E/AndroidRuntime( 5475): at com.airbnb.lottie.model.layer.ShapeLayer.drawLayer(ShapeLayer.java:30)
E/AndroidRuntime( 5475): at com.airbnb.lottie.model.layer.BaseLayer.draw(BaseLayer.java:201)
E/AndroidRuntime( 5475): at com.airbnb.lottie.model.layer.CompositionLayer.drawLayer(CompositionLayer.java:100)
E/AndroidRuntime( 5475): at com.airbnb.lottie.model.layer.BaseLayer.draw(BaseLayer.java:201)
E/AndroidRuntime( 5475): at com.airbnb.lottie.LottieDrawable.draw(LottieDrawable.java:319)
E/AndroidRuntime( 5475): at android.widget.ImageView.onDraw(ImageView.java:1360)
E/AndroidRuntime( 5475): at android.view.View.draw(View.java:20207)
E/AndroidRuntime( 5475): at android.view.View.buildDrawingCacheImpl(View.java:19478)
E/AndroidRuntime( 5475): at android.view.View.buildDrawingCache(View.java:19338)
E/AndroidRuntime( 5475): at android.view.View.draw(View.java:19927)
E/AndroidRuntime( 5475): at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
E/AndroidRuntime( 5475): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
E/AndroidRuntime( 5475): at android.view.View.updateDisplayListIfDirty(View.java:19073)
E/AndroidRuntime( 5475): at android.view.View.draw(View.java:19935)
E/AndroidRuntime( 5475): at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
E/AndroidRuntime( 5475): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
E/AndroidRuntime( 5475): at android.view.View.updateDisplayListIfDirty(View.java:19073)
E/AndroidRuntime( 5475): at android.view.View.draw(View.java:19935)
E/AndroidRuntime( 5475): at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
E/AndroidRuntime( 5475): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
E/AndroidRuntime( 5475): at android.view.View.updateDisplayListIfDirty(View.java:19073)
E/AndroidRuntime( 5475): at android.view.View.draw(View.java:19935)
E/AndroidRuntime( 5475): at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
E/AndroidRuntime( 5475): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
E/AndroidRuntime( 5475): at android.view.View.updateDisplayListIfDirty(View.java:19073)
E/AndroidRuntime( 5475): at android.view.View.draw(View.java:19935)
E/AndroidRuntime( 5475): at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
E/AndroidRuntime( 5475): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
E/AndroidRuntime( 5475): at android.view.View.draw(View.java:20210)
E/AndroidRuntime( 5475): at com.android.internal.policy.DecorView.draw(DecorView.java:780)
E/AndroidRuntime( 5475): at android.view.View.updateDisplayListIfDirty(View.java:19082)
E/AndroidRuntime( 5475): at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:686)
E/AndroidRuntime( 5475): at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:692)
E/AndroidRuntime( 5475): at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:801)
E/AndroidRuntime( 5475): at android.view.ViewRootImpl.draw(ViewRootImpl.java:3311)
E/AndroidRuntime( 5475): at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3115)
E/AndroidRuntime( 5475): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2484)
E/AndroidRuntime( 5475): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1460)
E/AndroidRuntime( 5475): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7183)
E/AndroidRuntime( 5475): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:949)
E/AndroidRuntime( 5475): at android.view.Choreographer.doCallbacks(Choreographer.java:761)
E/AndroidRuntime( 5475): at android.view.Choreographer.doFrame(Choreographer.java:696)
E/AndroidRuntime( 5475): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
E/AndroidRuntime( 5475): at android.os.Handler.handleCallback(Handler.java:873)
E/AndroidRuntime( 5475): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 5475): at android.os.Looper.loop(Looper.java:193)
E/AndroidRuntime( 5475): at android.app.ActivityThread.main(ActivityThread.java:6669)
E/AndroidRuntime( 5475): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 5475): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/AndroidRuntime( 5475): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
I watched Direct map import is not possible, please make Direct map import feature.
@override
Widget build(BuildContext context) {
return CupertinoPageScaffold(
child: Center(
child: SizedBox(
width: 500,
height: 300,
child: LottieView.fromFile(
autoPlay: true,
onViewCreated: onViewCreated,
filePath: "asset/animal/ani_hi.json"),
),
),
);
}
java.lang.IllegalStateException: Missing values for keyframe.
E/AndroidRuntime(10726): at com.airbnb.lottie.animation.keyframe.ScaleKeyframeAnimation.getValue(ScaleKeyframeAnimation.java:16)
E/AndroidRuntime(10726): at com.airbnb.lottie.animation.keyframe.ScaleKeyframeAnimation.getValue(ScaleKeyframeAnimation.java:9)
E/AndroidRuntime(10726): at com.airbnb.lottie.animation.keyframe.BaseKeyframeAnimation.getValue(BaseKeyframeAnimation.java:125)
E/AndroidRuntime(10726): at com.airbnb.lottie.animation.keyframe.TransformKeyframeAnimation.getMatrix(TransformKeyframeAnimation.java:118)
E/AndroidRuntime(10726): at com.airbnb.lottie.model.layer.BaseLayer.draw(BaseLayer.java:199)
E/AndroidRuntime(10726): at com.airbnb.lottie.model.layer.CompositionLayer.drawLayer(CompositionLayer.java:100)
E/AndroidRuntime(10726): at com.airbnb.lottie.model.layer.BaseLayer.draw(BaseLayer.java:201)
E/AndroidRuntime(10726): at com.airbnb.lottie.LottieDrawable.draw(LottieDrawable.java:319)
E/AndroidRuntime(10726): at android.widget.ImageView.onDraw(ImageView.java:1360)
E/AndroidRuntime(10726): at android.view.View.draw(View.java:21860)
E/AndroidRuntime(10726): at android.view.View.buildDrawingCacheImpl(View.java:21129)
E/AndroidRuntime(10726): at android.view.View.buildDrawingCache(View.java:20989)
E/AndroidRuntime(10726): at android.view.View.draw(View.java:21578)
E/AndroidRuntime(10726): at android.view.ViewGroup.drawChild(ViewGroup.java:4551)
E/AndroidRuntime(10726): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4326)
E/AndroidRuntime(10726): at android.view.View.updateDisplayListIfDirty(View.java:20719)
E/AndroidRuntime(10726): at android.view.View.draw(View.java:21586)
E/AndroidRuntime(10726): at android.view.ViewGroup.drawChild(ViewGroup.java:4551)
E/AndroidRuntime(10726): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4326)
E/AndroidRuntime(10726): at android.view.View.updateDisplayListIfDirty(View.java:20719)
E/AndroidRuntime(10726): at android.view.View.draw(View.java:21586)
E/AndroidRuntime(10726): at android.view.ViewGroup.drawChild(ViewGroup.java:4551)
E/AndroidRuntime(10726): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4326)
E/AndroidRuntime(10726): at android.view.View.updateDisplayListIfDirty(View.java:20719)
E/AndroidRuntime(10726): at android.view.View.draw(View.java:21586)
E/AndroidRuntime(10726): at android.view.ViewGroup.drawChild(ViewGroup.java:4551)
E/AndroidRuntime(10726): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4326)
E/AndroidRuntime(10726): at android.view.View.updateDisplayListIfDirty(View.java:20719)
E/AndroidRuntime(10726): at android.view.View.draw(View.java:21586)
E/AndroidRuntime(10726): at android.view.ViewGroup.drawChild(ViewGroup.java:4551)
E/AndroidRuntime(10726): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4326)
E/AndroidRuntime(10726): at android.view.View.draw(View.java:21863)
E/AndroidRuntime(10726): at com.android.internal.policy.DecorView.draw(DecorView.java:1083)
E/AndroidRuntime(10726): at android.view.View.updateDisplayListIfDirty(View.java:20733)
E/AndroidRuntime(10726): at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:725)
E/AndroidRuntime(10726): at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:731)
E/AndroidRuntime(10726): at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:840)
E/AndroidRuntime(10726): at android.view.ViewRootImpl.draw(ViewRootImpl.java:3932)
E/AndroidRuntime(10726): at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3706)
E/AndroidRuntime(10726): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3014)
E/AndroidRuntime(10726): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1873)
E/AndroidRuntime(10726): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8478)
E/AndroidRuntime(10726): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:949)
E/AndroidRuntime(10726): at android.view.Choreographer.doCallbacks(Choreographer.java:761)
E/AndroidRuntime(10726): at android.view.Choreographer.doFrame(Choreographer.java:696)
E/AndroidRuntime(10726): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
E/AndroidRuntime(10726): at android.os.Handler.handleCallback(Handler.java:873)
E/AndroidRuntime(10726): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(10726): at android.os.Looper.loop(Looper.java:214)
E/AndroidRuntime(10726): at android.app.ActivityThread.main(ActivityThread.java:6990)
E/AndroidRuntime(10726): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(10726): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/AndroidRuntime(10726): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1445)
I/Process (10726): Sending signal. PID: 10726 SIG: 9
Samsung Note 9 / Android 9.
gradle.properties:
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
at setProgressWithFrame method , the key should be frame instead of progress, and hope add cancelAnimation method
here is a more efficient way to introduce lottie to flutter, but it only support android, how ever I think it is the same way to iOS, maybe you can reference to this.
https://github.com/simolus3/fluttie
i think it is a piece ok cake to people like you who can handle both Android and iOS, hahahahaO(∩_∩)O...
Cannot find type 'LOTAnimationView' in scope
Getting this error while building for iOS:
flutter_lottie
does not specify a Swift version and none of the targets (Runner
) integrating it have the SWIFT_VERSION
attribute set. Please contact the author or set the SWIFT_VERSION
attribute in at least one of the targets that integrate this pod.mark922_flutter_lottie: ^0.2.1
-> Fetching podspec for `mark922_flutter_lottie` from `.symlinks/plugins/mark922_flutter_lottie/ios`
[!] No podspec found for `mark922_flutter_lottie` in `.symlinks/plugins/mark922_flutter_lottie/ios`
..........
Finished with error: Error running pod install
Newer versions (>2.5.3) of lottie-ios break the plugin because of the migration to Swift.
Noticed this when i ran the project on my Android device running Android 6.0. I was seeing a gray box around the Lottie animation that wasn't there on iOS. I kept seeing a print statement about enableMergePathsForKitCatAndAbove so i went to the java file to try and enable it. i added that method with (true) and it didnt fix it. I thought it may just be my device so i ran it in an emulator running API 28 and it still has a box around the view(although its a white box on the emulator). Don't know if it's the assets or an android platform bug
i tried the flutter_lottie exmaple avilable in the code but got the error,
I/flutter (11371): Creating Method Channel convictiontech/flutter_lottie_0 E/flutter (11371): [ERROR:flutter/shell/common/shell.cc(199)] Dart Error: Unhandled exception: E/flutter (11371): PlatformException(error, java.lang.IllegalStateException: Unable to parse composition E/flutter (11371): at com.airbnb.lottie.LottieAnimationView$2.onResult(LottieAnimationView.java:68) E/flutter (11371): at com.airbnb.lottie.LottieAnimationView$2.onResult(LottieAnimationView.java:66) E/flutter (11371): at com.airbnb.lottie.LottieTask.addFailureListener(LottieTask.java:111) E/flutter (11371): at com.airbnb.lottie.LottieAnimationView.setCompositionTask(LottieAnimationView.java:386) E/flutter (11371): at com.airbnb.lottie.LottieAnimationView.setAnimation(LottieAnimationView.java:338) E/flutter (11371): at com.example.flutter_lottie.LottieView.create(LottieView.java:68) E/flutter (11371): at com.example.flutter_lottie.LottieView.<init>(LottieView.java:38) E/flutter (11371): at com.example.flutter_lottie.LottieViewFactory.create(LottieViewFactory.java:20) E/flutter (11371): at io.flutter.plugin.platform.SingleViewPresentation.onCreate(SingleViewPresentation.java:174) E/flutter (11371): at android.app.Dialog.dispatchOnCreate(Dialog.java:407) E/flutter (11371): at android.app.Dialog.show(Dialog.java:302) E/flutter (11371): at android.app.Presentation.show(Presentation.java:249) E/flutter (11371): at io.flutter.plugin.platform.VirtualDisplayController.<init>(VirtualDisplayController.java:93) E/flutter (11371): at io.flutter.plugin.platform.VirtualDisplayController.create(VirtualDisplayController.java:53) E/flutter (11371): at io.flutter.plugin.platform.PlatformViewsController$1.createPlatformView(PlatformViewsController.java:105) E/flutter (11371): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:96) E/flutter (11371): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:60) E/flutter (11371): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:231) E/flutter (11371): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:93) E/flutter (11371): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:642) E/flutter (11371): at android.os.MessageQueue.nativePollOnce(Native Method) E/flutter (11371): at android.os.MessageQueue.next(MessageQueue.java:326) E/flutter (11371): at android.os.Looper.loop(Looper.java:160) E/flutter (11371): at android.app.ActivityThread.main(ActivityThread.java:6669) E/flutter (11371): at java.lang.reflect.Method.invoke(Native Method) E/flutter (11371): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) E/flutter (11371): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) E/flutter (11371): Caused by: java.io.FileNotFoundException: flutter_assets/assets/animations/donut.json E/flutter (11371): at android.content.res.AssetManager.nativeOpenAsset(Native Method) E/flutter (11371): at android.content.res.AssetManager.open(AssetManager.java:744) E/flutter (11371): at android.content.res.AssetManager.open(AssetManager.java:721) E/flutter (11371): at com.airbnb.lottie.LottieCompositionFactory.fromAssetSync(LottieCompositionFactory.java:100) E/flutter (11371): at com.airbnb.lottie.LottieCompositionFactory$1.call(LottieCompositionFactory.java:81) E/flutter (11371): at com.airbnb.lottie.LottieCompositionFactory$1.call(LottieCompositionFactory.java:79) E/flutter (11371): at java.util.concurrent.FutureTask.run(FutureTask.java:266) E/flutter (11371): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) E/flutter (11371): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) E/flutter (11371): at java.lang.Thread.run(Thread.java:764) E/flutter (11371): , null)
The app is crushing with the exception of "Missing values for keyframe"
Using the last version of the plugin (0.2.0)
App is migrated to AndroidX
Full output:
E/AndroidRuntime(19998): FATAL EXCEPTION: main E/AndroidRuntime(19998): Process: com.example.tasnet, PID: 19998 E/AndroidRuntime(19998): java.lang.IllegalStateException: Missing values for keyframe. E/AndroidRuntime(19998): at com.airbnb.lottie.animation.keyframe.IntegerKeyframeAnimation.getValue(IntegerKeyframeAnimation.java:16) E/AndroidRuntime(19998): at com.airbnb.lottie.animation.keyframe.IntegerKeyframeAnimation.getValue(IntegerKeyframeAnimation.java:8) E/AndroidRuntime(19998): at com.airbnb.lottie.animation.keyframe.BaseKeyframeAnimation.getValue(BaseKeyframeAnimation.java:125) E/AndroidRuntime(19998): at com.airbnb.lottie.model.layer.BaseLayer.draw(BaseLayer.java:197) E/AndroidRuntime(19998): at com.airbnb.lottie.model.layer.CompositionLayer.drawLayer(CompositionLayer.java:100) E/AndroidRuntime(19998): at com.airbnb.lottie.model.layer.BaseLayer.draw(BaseLayer.java:201) E/AndroidRuntime(19998): at com.airbnb.lottie.LottieDrawable.draw(LottieDrawable.java:319) E/AndroidRuntime(19998): at android.widget.ImageView.onDraw(ImageView.java:1270) E/AndroidRuntime(19998): at android.view.View.draw(View.java:17469) E/AndroidRuntime(19998): at android.view.View.buildDrawingCacheImpl(View.java:16764) E/AndroidRuntime(19998): at android.view.View.buildDrawingCache(View.java:16625) E/AndroidRuntime(19998): at android.view.View.draw(View.java:17231) E/AndroidRuntime(19998): at android.view.ViewGroup.drawChild(ViewGroup.java:3921) E/AndroidRuntime(19998): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3711) E/AndroidRuntime(19998): at android.view.View.updateDisplayListIfDirty(View.java:16459) E/AndroidRuntime(19998): at android.view.View.draw(View.java:17238)
Flutter Doctor Summary:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.7.8+hotfix.4, on Microsoft Windows [Version 10.0.18362.239], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Android Studio (version 3.3)
[√] VS Code, 64-bit edition (version 1.36.1)
[√] Connected device (1 available)
• No issues found!
Perhaps this should be mentioned in the README.
Also this is a potential problem, as projects with other dependencies do not compile if use_frameworks!
is used. Classic chicken-and-egg situation.
Hey @CameronStuartSmith. Firstly, thanks for this package!
Since it has not been updated in a while, I was wondering if you would be interested in allowing someone else to maintain it.
I'd be happy to help out. Let me know what you think!
Hi,
Lottie animation from Lottie json url are not animating until we use the same json as asset file in the project
My lottie raw json file could only display in full screen in serval devices, how can i use it like Image-BoxFit to adapt for different devices?
on Android 9 Xiaomi Note 5
E/flutter (30881): at io.flutter.plugin.platform.PlatformViewsController$1.createPlatformView(PlatformViewsController.java:91)
E/flutter (30881): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:96)
E/flutter (30881): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:60)
E/flutter (30881): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:231)
E/flutter (30881): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:93)
E/flutter (30881): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:642)
E/flutter (30881): at android.os.MessageQueue.nativePollOnce(Native Method)
E/flutter (30881): at android.os.MessageQueue.next(MessageQueue.java:326)
E/flutter (30881): at android.os.Looper.loop(Looper.java:165)
E/flutter (30881): at android.app.ActivityThread.main(ActivityThread.java:6810)
E/flutter (30881): at java.lang.reflect.Method.invoke(Native Method)
E/flutter (30881): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
E/flutter (30881): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
I would like to change the tint color of Lottie's animated art. How to do it?
LOTAnimationView
is now AnimationView
among other name changes.
relate issue
airbnb/lottie-ios#847
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.