You must set an images folder before loading an image.IllegalStateException

See original GitHub issue

Hello I’m using this repo and have one problem. I generated .json file with images from Adobe After Effect successfully.I inserted my json file in assets folder and images(5 images) in assets/Image.WeAccept folder.This is a part in my code ```<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=“Test.json” app:lottie_loop=“true” /> </FrameLayout>``

But when i run my app i have IllegalStateException. More about log message:

java.lang.IllegalStateException: You must set an images folder before loading an image. Set it with LottieComposition#setImagesFolder or LottieDrawable#setImagesFolder

How i can solve this problem? Thanks

Issue Analytics

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

github_iconTop GitHub Comments

6reactions
fang1994042128commented, Dec 3, 2018

Hello I used version 2.70。The same problem has occurred。 I used image resources。 mLottieAnimationView.setImageAssetsFolder(“images”); mLottieAnimationView.setAnimation(“data.json”);

You must set an images folder before loading an image. Set it with LottieComposition#setImagesFolder or LottieDrawable#setImagesFolder com.airbnb.lottie.manager.ImageAssetManager.bitmapForId(ImageAssetManager.java:107)

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to check if lottie animation works? - Stack Overflow
You must set an images folder before loading an image. Set it with LottieComposition#setImagesFolder or LottieDrawable#setImagesFolder.
Read more >
java.lang.IllegalStateException: You must set an images folder...
IllegalStateException : You must set an images folder. ... I'm seeing a crash on android, where the animation will begin to play but...
Read more >
I can't get Lottie to work. : r/androiddev - Reddit
I'm getting this error when the app is launched: java.lang.IllegalStateException: You must set an images folder before loading an image.
Read more >
y30.java - vivo游戏扩展引擎.apk源代码分析 - 摸瓜
throw new IllegalStateException("You must set an images folder before loading an image. Set it with LottieComposition#setImagesFolder or ...
Read more >
Android使用lottie加载json动画只显示部分以及You must set an ...
IllegalStateException : You must set an images folder before loading an image.Set it with LottieComposition#setImagesFolder or ...
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