Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: java.lang.StackOverflowError: stack size 8MB #1298

Closed
namkazt opened this issue Jul 2, 2019 · 48 comments · Fixed by #1332
Closed

Error: java.lang.StackOverflowError: stack size 8MB #1298

namkazt opened this issue Jul 2, 2019 · 48 comments · Fixed by #1332

Comments

@namkazt
Copy link

namkazt commented Jul 2, 2019

I'm not really sure why it happens but maybe i'm not releasing my fragment ( there is 3 fragment on top and each of it has 1 Lottie animation view )

Device: P6 android 5.0

Fatal Exception: java.lang.StackOverflowError: stack size 8MB
       at com.airbnb.lottie.LottieAnimationView.buildDrawingCache + 838(LottieAnimationView.java:838)
       at android.view.View.getDrawingCache + 14328(View.java:14328)
       at com.airbnb.lottie.LottieAnimationView.buildDrawingCache + 839(LottieAnimationView.java:839)
       at android.view.View.getDrawingCache + 14328(View.java:14328)
       at com.airbnb.lottie.LottieAnimationView.buildDrawingCache + 839(LottieAnimationView.java:839)
       at android.view.View.getDrawingCache + 14328(View.java:14328)
       at com.airbnb.lottie.LottieAnimationView.buildDrawingCache + 839(LottieAnimationView.java:839)
       at android.view.View.getDrawingCache + 14328(View.java:14328)
       at com.airbnb.lottie.LottieAnimationView.buildDrawingCache + 839(LottieAnimationView.java:839)
       at android.view.View.getDrawingCache + 14328(View.java:14328)
       at com.airbnb.lottie.LottieAnimationView.buildDrawingCache + 839(LottieAnimationView.java:839)
       at android.view.View.getDrawingCache + 14328(View.java:14328)
       at com.airbnb.lottie.LottieAnimationView.buildDrawingCache + 839(LottieAnimationView.java:839)
       at android.view.View.getDrawingCache + 14328(View.java:14328)
       at com.airbnb.lottie.LottieAnimationView.buildDrawingCache + 839(LottieAnimationView.java:839)
       at android.view.View.getDrawingCache + 14328(View.java:14328)
       at com.airbnb.lottie.LottieAnimationView.buildDrawingCache + 839(LottieAnimationView.java:839)
       at android.view.View.getDrawingCache + 14328(View.java:14328)
       at com.airbnb.lottie.LottieAnimationView.buildDrawingCache + 839(LottieAnimationView.java:839)
       at android.view.View.getDrawingCache + 14328(View.java:14328)
       at com.airbnb.lottie.LottieAnimationView.buildDrawingCache + 839(LottieAnimationView.java:839)
       at android.view.View.updateDisplayListIfDirty + 14215(View.java:14215)
       at android.view.View.getDisplayList + 14271(View.java:14271)
       at android.view.View.draw + 15056(View.java:15056)
       at android.view.ViewGroup.drawChild + 3528(ViewGroup.java:3528)
       at android.view.ViewGroup.dispatchDraw + 3322(ViewGroup.java:3322)
       at androidx.constraintlayout.widget.ConstraintLayout.dispatchDraw + 1873(ConstraintLayout.java:1873)
       at android.view.View.draw + 15363(View.java:15363)
       at android.view.View.updateDisplayListIfDirty + 14241(View.java:14241)
       at android.view.View.getDisplayList + 14271(View.java:14271)
       at android.view.View.draw + 15056(View.java:15056)
       at android.view.ViewGroup.drawChild + 3528(ViewGroup.java:3528)
       at android.view.ViewGroup.dispatchDraw + 3322(ViewGroup.java:3322)
       at android.view.View.updateDisplayListIfDirty + 14233(View.java:14233)
       at android.view.View.getDisplayList + 14271(View.java:14271)
       at android.view.View.draw + 15056(View.java:15056)
       at android.view.ViewGroup.drawChild + 3528(ViewGroup.java:3528)
       at android.view.ViewGroup.dispatchDraw + 3322(ViewGroup.java:3322)
       at androidx.constraintlayout.widget.ConstraintLayout.dispatchDraw + 1873(ConstraintLayout.java:1873)
       at android.view.View.draw + 15363(View.java:15363)
       at android.view.View.updateDisplayListIfDirty + 14241(View.java:14241)
       at android.view.View.getDisplayList + 14271(View.java:14271)
       at android.view.View.draw + 15056(View.java:15056)
       at android.view.ViewGroup.drawChild + 3528(ViewGroup.java:3528)
       at android.view.ViewGroup.dispatchDraw + 3322(ViewGroup.java:3322)
       at android.view.View.updateDisplayListIfDirty + 14233(View.java:14233)
       at android.view.View.getDisplayList + 14271(View.java:14271)
       at android.view.View.draw + 15056(View.java:15056)
       at android.view.ViewGroup.drawChild + 3528(ViewGroup.java:3528)
       at android.view.ViewGroup.dispatchDraw + 3322(ViewGroup.java:3322)
       at android.view.View.updateDisplayListIfDirty + 14233(View.java:14233)
       at android.view.View.getDisplayList + 14271(View.java:14271)
       at android.view.View.draw + 15056(View.java:15056)
       at android.view.ViewGroup.drawChild + 3528(ViewGroup.java:3528)
       at android.view.ViewGroup.dispatchDraw + 3322(ViewGroup.java:3322)
       at android.view.View.updateDisplayListIfDirty + 14233(View.java:14233)
       at android.view.View.getDisplayList + 14271(View.java:14271)
       at android.view.View.draw + 15056(View.java:15056)
       at android.view.ViewGroup.drawChild + 3528(ViewGroup.java:3528)
       at android.view.ViewGroup.dispatchDraw + 3322(ViewGroup.java:3322)
       at android.view.View.updateDisplayListIfDirty + 14233(View.java:14233)
       at android.view.View.getDisplayList + 14271(View.java:14271)
       at android.view.View.draw + 15056(View.java:15056)
       at android.view.ViewGroup.drawChild + 3528(ViewGroup.java:3528)
       at android.view.ViewGroup.dispatchDraw + 3322(ViewGroup.java:3322)
       at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchDraw + 2670(PhoneWindow.java:2670)
       at android.view.View.draw + 15363(View.java:15363)
       at android.widget.FrameLayout.draw + 647(FrameLayout.java:647)
       at com.android.internal.policy.impl.PhoneWindow$DecorView.draw + 2649(PhoneWindow.java:2649)
       at android.view.View.updateDisplayListIfDirty + 14241(View.java:14241)
       at android.view.View.getDisplayList + 14271(View.java:14271)
       at android.view.ThreadedRenderer.updateViewTreeDisplayList + 267(ThreadedRenderer.java:267)
       at android.view.ThreadedRenderer.updateRootDisplayList + 273(ThreadedRenderer.java:273)
       at android.view.ThreadedRenderer.draw + 312(ThreadedRenderer.java:312)
       at android.view.ViewRootImpl.draw + 2852(ViewRootImpl.java:2852)
       at android.view.ViewRootImpl.performDraw + 2689(ViewRootImpl.java:2689)
       at android.view.ViewRootImpl.performTraversals + 2313(ViewRootImpl.java:2313)
       at android.view.ViewRootImpl.doTraversal + 1251(ViewRootImpl.java:1251)
       at android.view.ViewRootImpl$TraversalRunnable.run + 6438(ViewRootImpl.java:6438)
       at android.view.Choreographer$CallbackRecord.run + 795(Choreographer.java:795)
       at android.view.Choreographer.doCallbacks + 598(Choreographer.java:598)
       at android.view.Choreographer.doFrame + 567(Choreographer.java:567)
       at android.view.Choreographer$FrameDisplayEventReceiver.run + 781(Choreographer.java:781)
       at android.os.Handler.handleCallback + 810(Handler.java:810)
       at android.os.Handler.dispatchMessage + 99(Handler.java:99)
       at android.os.Looper.loop + 189(Looper.java:189)
       at android.app.ActivityThread.main + 5529(ActivityThread.java:5529)
       at java.lang.reflect.Method.invoke(Method.java)
       at java.lang.reflect.Method.invoke + 372(Method.java:372)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run + 950(ZygoteInit.java:950)
       at com.android.internal.os.ZygoteInit.main + 745(ZygoteInit.java:745)
@shenghaiyang
Copy link

+1

@gpeal
Copy link
Collaborator

gpeal commented Jul 6, 2019

@namkazt @shenghaiyang Can you attach a sample project that reproduces this?

@namkazt
Copy link
Author

namkazt commented Jul 7, 2019

@gpeal I think it relates to Lottie not release or pause when invisible or something. It did not happen on my device but 1 user. I just got some crash report about it.

@AndroidDeveloperLB
Copy link

AndroidDeveloperLB commented Jul 7, 2019

I got the same issue recently on Lottie 3.0.7, but all cases on Android 4.x . Any solution for this?

@gpeal I can send the sample animations, but only via email because it's a closed sourced app of the office. Note that this didn't occur on older version of Lottie that we used (3.0.3) , and I don't think we added more animations since we used the other version.

@namkazt on which version of Lottie did you have this?

image

Fatal Exception: java.lang.StackOverflowError
       at com.airbnb.lottie.LottieAnimationView.buildDrawingCache + 854(LottieAnimationView.java:854)
       at android.view.View.getDrawingCache + 14251(View.java:14251)
       ...
       at android.view.ViewGroup.onAnimationStart + 2896(ViewGroup.java:2896)
       at android.view.View.drawAnimation + 14749(View.java:14749)
       at android.view.View.draw + 14890(View.java:14890)
       at android.view.ViewGroup.drawChild + 3309(ViewGroup.java:3309)
       at android.view.ViewGroup.dispatchDraw + 3146(ViewGroup.java:3146)
       at android.view.View.draw + 15142(View.java:15142)
       at android.view.ViewGroup.drawChild + 3309(ViewGroup.java:3309)
       at android.view.ViewGroup.dispatchDraw + 3146(ViewGroup.java:3146)
       at android.view.View.draw + 15262(View.java:15262)
       at android.widget.FrameLayout.draw + 472(FrameLayout.java:472)
       at android.view.ViewRootImpl.drawSoftware + 2881(ViewRootImpl.java:2881)
       at android.view.ViewRootImpl.draw + 2794(ViewRootImpl.java:2794)
       at android.view.ViewRootImpl.performDraw + 2632(ViewRootImpl.java:2632)
       at android.view.ViewRootImpl.performTraversals + 2203(ViewRootImpl.java:2203)
       at android.view.ViewRootImpl.doTraversal + 1249(ViewRootImpl.java:1249)
       at android.view.ViewRootImpl$TraversalRunnable.run + 6542(ViewRootImpl.java:6542)
       at android.view.Choreographer$CallbackRecord.run + 814(Choreographer.java:814)
       at android.view.Choreographer.doCallbacks + 614(Choreographer.java:614)
       at android.view.Choreographer.doFrame + 584(Choreographer.java:584)
       at android.view.Choreographer$FrameDisplayEventReceiver.run + 800(Choreographer.java:800)
       at android.os.Handler.handleCallback + 733(Handler.java:733)
       at android.os.Handler.dispatchMessage + 95(Handler.java:95)
       at android.os.Looper.loop + 146(Looper.java:146)
       at android.app.ActivityThread.main + 5602(ActivityThread.java:5602)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke + 515(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run + 1283(ZygoteInit.java:1283)
       at com.android.internal.os.ZygoteInit.main + 1099(ZygoteInit.java:1099)
       at dalvik.system.NativeStart.main(NativeStart.java)

@namkazt
Copy link
Author

namkazt commented Jul 7, 2019

the latest version I guess. I just start using Lottie recently

@AndroidDeveloperLB
Copy link

@namkazt Well you can try v3.0.3 for now, perhaps.
That's what we will do, hoping that indeed it's a new issue, as it didn't occur before.

@AndroidDeveloperLB
Copy link

Sadly going to v3.0.3 causes this issue:
#667

@gpeal
Copy link
Collaborator

gpeal commented Jul 10, 2019

@namkazt @AndroidDeveloperLB What are the steps to reproduce this?

@namkazt
Copy link
Author

namkazt commented Jul 10, 2019

@gpeal sorry, I never got this on my side. Just report from Crashlytic that crash happens on some users devices.

but is it look like this com.airbnb.lottie.LottieAnimationView.buildDrawingCache got called too many time and make stack overflow?

@AndroidDeveloperLB
Copy link

@gpeal It's all reported by hundreds of crashes on Crashlytics. One issue is on Android 4.x and another issue is on Android 8.0.

We have only 2 json files for Lottie. If you wish, I can send you via email and you could check them out.

The use case is just showing AnimationView with the animation on the raw folder. I hope that putting them into the assets folder will fix it.

@gpeal
Copy link
Collaborator

gpeal commented Jul 10, 2019

@namkazt @AndroidDeveloperLB I don't think that will fix it. If you are able to repro it, that would be great. I just tested an animation on KitKat and it worked fine. You can use animations from Lottiefiles if you don't want to share your own.

@AndroidDeveloperLB
Copy link

@gpeal I don't mind to share mine. But I don't own them. The company does. And so I said I can send you via email instead.
Also, as I wrote, this is reported by real users, and not all users. If it was all users, it would have been much more than a few hundreds per day.
The bug exists. Just because you and I can't reproduce it doesn't mean it doesn't.

And it's actually 2 bugs. One on the old version (3.0.3) of Lottie, and one on the new one (3.0.7).

@gpeal
Copy link
Collaborator

gpeal commented Jul 11, 2019

@AndroidDeveloperLB I never said it didn't exist. I just need to be able to reproduce it to fix it.

@AndroidDeveloperLB
Copy link

@gpeal Recently I got a lot of messages from Google similar to "We can't reproduce it so we close this issue".
Instead of investigating, they just close those issues. There are issues that existed for months and years this way, and then they close them...

In any case, I already offered you the animation files.

@Smarpit-Singh
Copy link

Everything works well. But when I change fragment while the animation is running my app gets crashed.

java.lang.StackOverflowError: stack size 8MB at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.View.getDrawingCache(View.java:14136) at com.airbnb.lottie.LottieAnimationView.buildDrawingCache(LottieAnimationView.java:822) at android.view.Vie

@gpeal
Copy link
Collaborator

gpeal commented Jul 16, 2019

@Smarpit-Singh Can you create a sample project that reproduces this? That would be super helpful.

@Smarpit-Singh
Copy link

Thank you for your response but I already solve this. This exception has arrived when I close the fragment where Lottie animation is visible. I just set its visibility to gone in onStop();

@AndroidDeveloperLB
Copy link

@Smarpit-Singh This sounds like a workaround that you shouldn't need to use at all.
There is no kind of View that I saw a need for this thing.

@AndroidDeveloperLB
Copy link

An update:
Since we couldn't use 3.0.7 as we don't know of a workaround for the above issue, we tried 3.0.3, but then we got "IllegalStateException: Unable to parse composition", as shown here.
Someone there said we could try to put the animation files (json files) into the assets folder.

This seems to help a lot, but not in 100% of the times.
From around 100 crashes a day (we have a lot of users) , we got only a single one on the recent day:

image

I hope it's indeed helping and not just me being optimistic.

I wonder if the same trick could help with 3.0.7. Can anyone try it too?

@gpeal
Copy link
Collaborator

gpeal commented Jul 18, 2019

@AndroidDeveloperLB Any help reproing this would be appreciated. As soon as I have a repro, I'll fix it and push an update.

@AndroidDeveloperLB
Copy link

AndroidDeveloperLB commented Jul 18, 2019

@gpeal I already told you multiple times: I can help you with whatever you wish. Just ask.
I can send you the animation files via email (as it's a closed source app of the office).
I can also send you the layout XML file we used, but it's really a very simple usage...
Or the links to the crash reports on Crashlytics.

I do not know how to reproduce it, because of this reason .

Anyway, currently the situation is as such:
v3.0.7 with animation files in res/drawable folder - causes "StackOverflowError: stack size" . Seems to occur only on Android 4.4.x , but others here reported about other versions being affected too
v3.0.3 with animation files in res/drawable folder- causes "IllegalStateException: Unable to parse composition". Seems to occur only on Android 8.x .
v3.0.3 with animation files in assets folder- For now it seems that it very rarely causes "IllegalStateException: Unable to parse composition". Seems to occur only on Android 8.x . I'm still checking it out. I might be wrong on this. It got now to 2 crashes (2 users).

So the only check that is left is:
v3.0.7 with animation files in assets folder. Maybe it will help reduce the crashes occurrences, or entirely.

Sadly I'm in no position to make this kind of test on millions of users. If anyone here tries it, please let me know.

EDIT: seems this didn't help. The crash still occurs for many

@namkazt
Copy link
Author

namkazt commented Jul 18, 2019

for now I'm usingdevice class year for disable lottie animation on all low-end device.

@AndroidDeveloperLB
Copy link

Sadly our decision was incorrect . Reverting to 3.0.3 and putting the files in the assets folder didn't help:

image

For now, I will try to go to 3.0.7, and just decide that on Android 4.4 , it will use a static image instead of a Lottie animation.

@AndroidDeveloperLB
Copy link

AndroidDeveloperLB commented Jul 21, 2019

I've tried now on Xiaomi "Mi Phone" which has Android 4.4.4, and succeeded getting the crash!
Even setting a static image (vectorDrawable) to the LottieAnimationView has caused it, while the animation files were removed.

I'm will try to make a POC that will show the issue. Hopefully I will be able to reproduce it on the POC too.

@AndroidDeveloperLB
Copy link

AndroidDeveloperLB commented Jul 21, 2019

Got a POC to reproduce the issue. It was caused when switching to its container via ViewAnimator:

<ViewAnimator
        xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools"
        android:id="@+id/viewSwitcher" android:layout_width="match_parent"
        android:layout_height="match_parent" android:layout_gravity="center"
        android:inAnimation="@android:anim/fade_in" android:outAnimation="@android:anim/fade_out">

    <androidx.appcompat.widget.AppCompatImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" android:layout_gravity="center"
            android:src="@android:drawable/sym_def_app_icon"/>

    <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center" android:gravity="center" android:orientation="vertical">

        <com.airbnb.lottie.LottieAnimationView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:srcCompat="@drawable/ic_check_black_24dp"
                android:layout_gravity="center"
                tools:src="@tools:sample/avatars"/>

        <!--Using this instead will work fine:-->
        <!--<androidx.appcompat.widget.AppCompatImageView-->
                <!--android:layout_width="wrap_content"-->
                <!--android:layout_height="wrap_content"-->
                <!--app:srcCompat="@drawable/ic_check_black_24dp"-->
                <!--android:layout_gravity="center"-->
                <!--tools:src="@tools:sample/avatars"/>-->

    </LinearLayout>

</ViewAnimator>

It occurs even when I give the LottieAnimationView a simple VectorDrawable.

Attached here the POC.

MyApplication.zip

Please check it out. Note that it occurs only on 4.4, but succeeded to reproduce it even on emulator, so you don't need to use a device. As I wrote, it doesn't even need an animation file to play, to reproduce the crash.

Here's a video showing that indeed this is the cause for it, on 4.4 emulator:

2019-07-21_17-19-49.zip

Possible workaround is to set visibility instead of switching views.

@gpeal
Copy link
Collaborator

gpeal commented Jul 22, 2019

@namkazt @shenghaiyang @AndroidDeveloperLB 3.1.0-SNAPSHOT will be up with this fix any minute.

@gpeal
Copy link
Collaborator

gpeal commented Jul 22, 2019

Thank you @AndroidDeveloperLB, the repro was helpful 😄

@AndroidDeveloperLB
Copy link

@gpeal Can you please explain why this happened?
And what to put in the dependencies now ?

@namkazt
Copy link
Author

namkazt commented Jul 23, 2019

@gpeal Thanks 😄

@AndroidDeveloperLB
Copy link

@namkazt I hope this is the only cause for this issue.

@namkazt
Copy link
Author

namkazt commented Jul 23, 2019

I'm not able to test it yet but i will.

@gpeal
Copy link
Collaborator

gpeal commented Jul 24, 2019

@AndroidDeveloperLB 3.1.0-SNAPSHOT

@AndroidDeveloperLB
Copy link

@gpeal I mean what to put in the dependency.

@rimmer
Copy link

rimmer commented Aug 19, 2019

@AndroidDeveloperLB
First, add sonatype to repositories

repositories {
    /** ... **/
    // this is for lottie SNAPSHOT
    maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}

Then, use SNAPSHOT version in deps:

implementation 'com.airbnb.android:lottie:3.1.0-SNAPSHOT'

@AndroidDeveloperLB
Copy link

AndroidDeveloperLB commented Aug 19, 2019

@rimmer
Tested on emulator with 4.4. Seems to work fine with it.
I hope the new version will come soon.
Are there any known issues with the 3.1.0-SNAPSHOT ? I don't want to switch to it just to see yet another issue...

@rimmer
Copy link

rimmer commented Aug 19, 2019

@AndroidDeveloperLB
I have released it to beta channel only today, so will see :)

@AndroidDeveloperLB
Copy link

@rimmer Other than the sample I've shown, have you tried similar cases? switching between different LottieAnimationView instances, for example? Maybe while one is playing?

@gpeal
Copy link
Collaborator

gpeal commented Aug 20, 2019

@AndroidDeveloperLB No known issues with the latest snapshot

@rimmer
Copy link

rimmer commented Aug 20, 2019 via email

@AndroidDeveloperLB
Copy link

Hey I have an android-library module that needs Lottie, and when I try to add the dependency it fails to find it, even though I added maven { url "https://oss.sonatype.org/content/repositories/snapshots" } to the repositories part:

image

How come?

@gpeal
Copy link
Collaborator

gpeal commented Aug 29, 2019

@AndroidDeveloperLB
Copy link

@gpeal I know. The POC works fine, but in the large project, which contains various modules, I had to add it to one of the modules which is more independent . I never did such a thing, I think...

@AndroidDeveloperLB
Copy link

Is the 3.1.0 available now? Somehow Android Studio told me it, but I don't see it mentioned here:

https://mvnrepository.com/artifact/com.airbnb.android/lottie
https://github.com/airbnb/lottie-android/releases

@gpeal
Copy link
Collaborator

gpeal commented Oct 15, 2019

@AndroidDeveloperLB It is.

@AndroidDeveloperLB
Copy link

AndroidDeveloperLB commented Oct 15, 2019

Weird. I didn't see it there .
And on the mvn website I still don't see it.
How come?
How could the IDE know better than the website?

@gpeal
Copy link
Collaborator

gpeal commented Oct 16, 2019

@AndroidDeveloperLB
Copy link

@gpeal Also here now:
https://mvnrepository.com/artifact/com.airbnb.android/lottie
Weird that it takes such time to get updated...

@AndroidDeveloperLB
Copy link

I think 3.1.0 doesn't have this issue. Thank you for fixing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants