lottie踩坑记录

lottie踩坑

1.Unable to parse composition

原因,json资源缺失

06-26 12:08:20.526 26711 26711 D AndroidRuntime: Shutting down VM
06-26 12:08:20.527 26711 26711 E AndroidRuntime: FATAL EXCEPTION: main
06-26 12:08:20.527 26711 26711 E AndroidRuntime: Process: com.android.settings, PID: 26711
06-26 12:08:20.527 26711 26711 E AndroidRuntime: java.lang.IllegalStateException: Unable to parse composition
06-26 12:08:20.527 26711 26711 E AndroidRuntime: 	at com.airbnb.lottie.LottieAnimationView$1.onResult(LottieAnimationView.java:74)
06-26 12:08:20.527 26711 26711 E AndroidRuntime: 	at com.airbnb.lottie.LottieAnimationView$1.onResult(LottieAnimationView.java:67)
06-26 12:08:20.527 26711 26711 E AndroidRuntime: 	at com.airbnb.lottie.LottieAnimationView$3.onResult(LottieAnimationView.java:91)
06-26 12:08:20.527 26711 26711 E AndroidRuntime: 	at com.airbnb.lottie.LottieAnimationView$3.onResult(LottieAnimationView.java:84)
06-26 12:08:20.527 26711 26711 E AndroidRuntime: 	at com.airbnb.lottie.LottieTask.notifyFailureListeners(LottieTask.java:158)
06-26 12:08:20.527 26711 26711 E AndroidRuntime: 	at com.airbnb.lottie.LottieTask.access$200(LottieTask.java:27)
06-26 12:08:20.527 26711 26711 E AndroidRuntime: 	at com.airbnb.lottie.LottieTask$1.run(LottieTask.java:133)
06-26 12:08:20.527 26711 26711 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:938)
06-26 12:08:20.527 26711 26711 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
06-26 12:08:20.527 26711 26711 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:223)
06-26 12:08:20.527 26711 26711 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7495)
06-26 12:08:20.527 26711 26711 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
06-26 12:08:20.527 26711 26711 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
06-26 12:08:20.527 26711 26711 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:941)
06-26 12:08:20.527 26711 26711 E AndroidRuntime: Caused by: java.io.FileNotFoundException: fingerprint_anim.json
06-26 12:08:20.527 26711 26711 E AndroidRuntime: 	at android.content.res.AssetManager.nativeOpenAsset(Native Method)
06-26 12:08:20.527 26711 26711 E AndroidRuntime: 	at android.content.res.AssetManager.open(AssetManager.java:874)
06-26 12:08:20.527 26711 26711 E AndroidRuntime: 	at android.content.res.AssetManager.open(AssetManager.java:851)
06-26 12:08:20.527 26711 26711 E AndroidRuntime: 	at com.airbnb.lottie.LottieCompositionFactory.fromAssetSync(LottieCompositionFactory.java:181)
06-26 12:08:20.527 26711 26711 E AndroidRuntime: 	at com.airbnb.lottie.LottieCompositionFactory$2.call(LottieCompositionFactory.java:146)
06-26 12:08:20.527 26711 26711 E AndroidRuntime: 	at com.airbnb.lottie.LottieCompositionFactory$2.call(LottieCompositionFactory.java:143)
06-26 12:08:20.527 26711 26711 E AndroidRuntime: 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
06-26 12:08:20.527 26711 26711 E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
06-26 12:08:20.527 26711 26711 E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
06-26 12:08:20.527 26711 26711 E AndroidRuntime: 	at java.lang.Thread.run(Thread.java:923)

本问题发生于,一个app同时兼容多种风格,例如编译brand2时,发现无指定aseets,报如上错误。

lottie踩坑记录_第1张图片

你可能感兴趣的:(Android,lottile)