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
 

Unable to parse composition的更多相关文章

  1. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:create (default-cli) on project standalone-pom: Unable to parse configuration of 3: mojo org.apache.maven.plugins:

    问题: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:create (defau ...

  2. Guzzle Unable to parse JSON data: JSON_ERROR_SYNTAX - Syntax error, malformed JSON

    项目更新到正式平台时,出现Guzzle(5.3) client get请求出现:Unable to parse JSON data: JSON_ERROR_SYNTAX - Syntax error, ...

  3. Android studio无法创建类和接口问题解决办法。提示 Unable to parse template "Class"

    重新配置了studio 的工作环境, 没问题,后来加需求要新增java类和接口,这就出现问题了,新建的时候,就会报错: Unable to parse template "Interface ...

  4. TNS-12560,TNS-00583: Valid node checking: unable to parse configuration parameters

    测试环境11.2.0.4.0, os系统linux 5.6 单实例,监听文件,启动报错: [oracle@adg1 admin]$ lsnrctl start LSNRCTL for Linux: V ...

  5. idea: Unable to parse template "class"

    使用idea创建文件时,报“Cannot Create Class”.具体错误为: Unable to parse template "Class" error meesage: ...

  6. IntelliJ IDEA遇到Unable to parse template “Class”错误

    在新安装的Ubuntu16下运行IntelliJ IDEA时, 遇到一个错误,在新建class的时候,提示Unable to parse template “Class” 通过查看 Settings ...

  7. Unable to parse request org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. null

    最近做一个web项目中有上传文件的功能,已经写出并在本地和部署到服务器上测试了好几个文件上传都没问题(我用的是tomcat).部署上服务器,上传图片时有的图片大就回在tomcat日志报如下错误: Un ...

  8. 当我new class的时候,提示以下错误: Unable to parse template "Class" Error message: This template did not produce a Java class or an interface Error parsing file template: Unable to find resource 'Package Header.j

    你肯定修改过class的template模板,改回去就好了 #if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")packag ...

  9. CheckStyle:unable to parse configuration stream - Element type "message" must be declared

    版本在1.3以上,包括1.3: <!DOCTYPE module PUBLIC          "-//Puppy Crawl//DTD Check Configuration 1. ...

随机推荐

  1. HTTP中的2XX状态码

    HTTP状态码分类 1XX --信息,服务器收到请求,需要请求者继续执行操作 2XX--成功,操作被成功接收并处理 3XX--重定向,需要进一步的操作以完成请求 4XX--客户端错误,请求包含语法错误 ...

  2. java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment

    请求验证码时后台报错:java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment ...

  3. 1_Swift概况

    Swift 标准库 解决复杂的问题并编写高性能,可读的代码 概况 Swift标准库定义了用于编写Swift程序的基本功能,其中包括 1.如基本数据类型Int,Double以及String 2.共同的数 ...

  4. Linux中LVM逻辑卷管理

    一.简介 LVM是逻辑盘卷管理(Logical Volume Manager)的简称,它是Linux环境下对磁盘分区 进行管理的一种机制,LVM是建立在硬盘和分区之上的一个逻辑层,来提高磁盘分区管理的 ...

  5. redis删除策略

    redis 设置过期时间 Redis 中有个设置时间过期的功能,即对存储在 redis 数据库中的值可以设置一个过期时间.作为一个缓存数据库,这是非常实用的.如我们一般项目中的 token 或者一些登 ...

  6. emacs c/c++ 中使用的命令大杂烩

    emacs c/c++ 中使用的命令大杂烩 注释,缩进,光标移动等 键盘操作 键盘操作对应函数名 说明 ESC Ctrl \ indent-region 对光标和标记之间的每行文本进行缩进 ESC ; ...

  7. 201871010116-祁英红《面向对象程序设计(java)》第二周学习总结

    博文正文开头格式:(3分) 项目 内容 <面向对象程序设计(java)> https://home.cnblogs.com/u/nwnu-daizh/ 这个作业的要求在哪里 https:/ ...

  8. C++编程思想 - 对象的创建和使用

    前言 用户定义的数据类型(data type)或类(class),是C++区别于传统过程型语言的地方. 通常将创建好的类库存放在库(library)中. 本篇会使用几个C++类库(class libr ...

  9. MySQL学习笔记1——DDL

    DDL 1.数据库 *查看所有数据库:SHOW DATABASES;*切换(选择要操作的)数据库:USE 数据库名;*创建数据库:CREATE DATABASES [IF NOT EXISTS] my ...

  10. 解决Python开发中,Pycharm中无法使用中文输入法问题

    Pycharm是开发Python程序的利器,但有时会遇到无法输入中文的情况.表现为:在Ubuntu系统可以正常输入中文,却在Pycharm内写注释的时候,切换不出中文.下面演示如何解决此问题. 1.在 ...