zoukankan      html  css  js  c++  java
  • Unable to parse composition

    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
            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
    
     
  • 相关阅读:
    CSS边框,背景,边距,溢出
    数字电子技术课程设计之基于触发器的三位二进制同步减法计数器无效态000/110
    集成电路版图与工艺课程设计之用CMOS实现Y=AB+C电路与版图
    金属磁记忆传感器封装
    基于FPGA 的8b10b编解码电路前端电路设计
    Css颜色和文本字体
    Css中的选择器
    Css基本语法及页面引用
    65 插入排序
    63 散列表的查找
  • 原文地址:https://www.cnblogs.com/endv/p/12013911.html
Copyright © 2011-2022 走看看