Unable to parse composition

When i tried to load gif to my project suddenly return me error:

Java.Lang.IllegalStateException: 'Unable to parse composition'

I want to insert gif to my project I tried to use Lottie and Json File

My code so far

<forms:AnimationView
x:Name="animationView"
Grid.Row="1"
Animation="first.json"
Loop="false"
AutoPlay="false"/>
 

Please add xmlns:lottie="clr-namespace:Lottie.Forms;assembly=Lottie.Forms" to your XAML head and use this component

 <lottie:AnimationView
x:Name="AnimationView"
Animation="first.json"
AutoPlay="True" Loop="true"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand" />

and dont forget to init AnimationViewRenderer.Init(); on MainActivity and AppDelegate

 
 
  •  
    i did it but same error. where must be first.json in assest folder or ? – Hristo Ivanov Nov 4 at 12:31
  •  
    Now i have new error link – Hristo Ivanov Nov 4 at 12:35
  •  
    @HristoIvanov the json files must be in Assets for android and Resources for iOS – Guilherme Nimer Nov 4 at 12:37 
  •  
    Yes I did it link but same error – Hristo Ivanov Nov 4 at 12:44
  •  
    Ok Thanks Fix it Paste 'AnimationViewRenderer.Init()' at wrong place Thanks again for advice – Hristo Ivanov Nov 4 at 12:46
             at 
        com.airbnb.lottie.LottieAnimationView$2.onResult(LottieAnimationView.java:75)
at
com.airbnb.lottie.LottieAnimationView$2.onResult(LottieAnimationView.java:73)
at
com.airbnb.lottie.LottieTask.notifyFailureListeners(LottieTask.java:158)
at com.airbnb.lottie.LottieTask.access$200(LottieTask.java:27)
at com.airbnb.lottie.LottieTask$1.run(LottieTask.java:133)
at android.os.Handler.handleCallback(Handler.java:836)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:232)
at android.app.ActivityThread.main(ActivityThread.java:6802)
at java.lang.reflect.Method.invoke(Method.java)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1103)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)``` ’
I also encountered the same problem, but I couldn't find the AnimationViewRenderer class in my code to initialize it
 

最新文章

  1. UNICODE字符集(20140520)
  2. 学习记录 java 值类型和引用类型的知识
  3. Python入门和基础
  4. iOS基础CGAffineTransform的简单使用
  5. 使用mii-tool设置网卡速率
  6. 服务器之间免密码ssh登陆
  7. PreferenceFragment 使用 小结
  8. if和for的几个经典题目
  9. NHibernate学习教程(6)--事务Transactions
  10. ASP.NET中HttpContext.Cache的使用
  11. Dynamics CRM - 使用 C# Plugin 调用 SQL 存储过程
  12. ./runInstaller: Permission denied
  13. Oracle 12c pdb的数据泵导入导出
  14. linux每日命令(12):nl命令
  15. orace学习操作(4)
  16. kafka报错处理
  17. Eclipse4.6安装Tomcat插件时报错:Unable to read repository at http://tomcatplugin.sf.net/update/content.xml. Received fatal alert: handshake_failure
  18. typename在C++中的用法
  19. 当inline-block或者float失效的时候怎么弄
  20. mysql的两种存储引擎

热门文章

  1. PHP面试题2019年搜狐面试题及答案解析
  2. Winform中设置ZedGraph的X轴的刻度根据曲线获取
  3. Spring Boot的注解,你知道或者不知道的都在这里!
  4. WebService发布服务例子
  5. 【XML】利用Dom4j读取XML文档以及写入XML文档
  6. MySQL分组查询统计
  7. bayaim_hadoop1_2.2.0伪分布式搭建
  8. Python—内置三大装饰器(@staticmethod、@classmethod、@property)
  9. pycharm 远程连接
  10. DRF--介绍和安装