Lottie animation on Expo

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 18:21:54

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!