You must set an images folder before loading an image.IllegalStateException
See original GitHub issueHello
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:
- Created 6 years ago
- Comments:7

Top Related StackOverflow Question
@fang1994042128 http://airbnb.io/lottie/android/images.html
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)