facebookarchive / Keyframes

A library for converting Adobe AE shape based animations to a data format and playing it back on Android and iOS devices.
https://facebookincubator.github.io/Keyframes/
Other
5.34k stars 302 forks source link

Illegar argument for frame_rate #133

Closed TheRishka closed 7 years ago

TheRishka commented 7 years ago

Hi! I've faced this issue: Application crashes with IllegarArgumentException, when I try to load my json to keyframes. Here is how I do it:

InputStream stream = getResources().getAssets().open("slide_1_animation.json");
KFImage image = KFImageDeserializer.deserialize(stream);
KeyframesDrawable kfDrawable = new KeyframesDrawableBuilder().withImage(image).build();
animationView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
animationView.setImageDrawable(kfDrawable);
animationView.setImageAlpha(0);
kfDrawable.startAnimation();

Here is a line of json that contains info about frame-rate: {"v":"4.5.7","fr":30,"ip":0,"op":240.0000097754,"w":360,"h":384

Is it a bug, or is it me who does something in a wrong way?:)

renyu-io commented 7 years ago

Hi @TheRishka this doesn't look like a keyframes file.