问题
I'm using this animation in my react native Expo app: https://www.lottiefiles.com/86-bouncy-dribbble-ball
The animation runs, I can see the shadow of the ball but I can't see the ball image.
The image is defined like this in the animation json file:
[{"id":"image_0","w":289,"h":287,"u":"images/","p":"img_0.png"}]
I put the image and the json file into the same folder. I guess Lottie can't find the image. I tried lots of different combinations for the "u" parameter but I couldn't manage to show the image.
Any help is appreciated.
回答1:
https://github.com/airbnb/lottie-react-native/issues/145
I found the solution - just drag the images folder into your bundle resources in your Xcode project.
来源:https://stackoverflow.com/questions/44920285/lottie-animation-on-expo