question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LottieAnimationView not displayed because it is too large to fit into a software layer

See original GitHub issue

When I run Example.Forms.Droid project on my Samsung S6 edge I get the following log:

[View] LottieAnimationView not displayed because it is too large to fit into a software layer (or drawing cache), needs 15367680 bytes, only 14745600 available

This happens when using LottieLogo1.json, but not when using Belo Foggy.json.

I don’t have this problem when I run Example.Droid project using this fragment_list.xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">
    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingBottom="32dp"
        android:background="@color/colorPrimary">
        <com.airbnb.lottie.LottieAnimationView
            android:id="@+id/animation_view"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            app:lottie_fileName="LottieLogo1.json"
            app:lottie_loop="true" />
    </FrameLayout>
    <android.support.v7.widget.RecyclerView
        android:id="@+id/recycler_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layoutManager="LinearLayoutManager" />
</LinearLayout>

How can I solve this problem?

Thanks

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
rguilluycommented, Dec 4, 2017

Indeed, adding withRequest & HeightRequest to the AnimationView fix the the bug.

1reaction
vincentcastagnacommented, Dec 1, 2017

Got the same prob with XF . Had to put the animationView in a layout with both vertical and layout option to FillAndExpand, and put a width and height request to the lottie animation …

Read more comments on GitHub >

github_iconTop Results From Across the Web

LottieAnimationView not displayed because it is too large to fit ...
LottieAnimationView not displayed because it is too large to fit into a software layer (or drawing cache), needs 23040000 bytes, only 10108800 available....
Read more >
TextView Too Large to Fit into Software Layer
AppCompatTextView not displayed because it is too large to fit into a software layer (or drawing cache), needs 9131520 bytes, only 8294400 ...
Read more >
Lotti | B4X Programming Forum
If rendering via software, Android will fail to generate a bitmap if the view is too large. Rather than displaying
Read more >
Fish-Lottie: How to Implement a High-performance Animation ...
Developers can pass properties, such as width, height, and alignment, to the AnimationController object when creating the LottieAnimationView ...
Read more >
Lottie Docs
Lottie is a library for Android, iOS, Web, and Windows that parses Adobe After Effects animations exported as JSON with Bodymovin and renders...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found