【问题标题】:How can I fix this error in my Lottie XML code in Android Studio?如何在 Android Studio 的 Lottie XML 代码中修复此错误?
【发布时间】:2021-07-05 08:26:39
【问题描述】:

我的 lottie XML 有问题,我的代码为空:

<com.airbnb.lottie.LottieAnimationView
    android:id="@+id/animationView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:lottie_rawRes="@raw/animation"
    app:lottie_autoPlay="true"
    app:lottie_loop="true"/>

这是我对 Lottie 的 gradle 实现:

implementation "com.airbnb.android:lottie:3.4.0"

这是错误(图片 SS 代码)

【问题讨论】:

  • 检查您是否处于离线模式。
  • 我必须检查哪里?
  • 您能详细说明一下这个问题吗?有没有可以与我们分享的错误日志或屏幕截图?
  • 看一下,我被编辑了。添加截图图片

标签: android xml android-studio lottie


【解决方案1】:

也许它适用于以下更改:

将版本 "com.airbnb.android:lottie:3.4.0" 更改为 "com.airbnb.android:lottie:3.7.0"

也在 build.gradle 中:

jcenter() 更改为mavenCentral()

你仍然遇到同样的问题转到 File > Invalidate Caches/Restart

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-11-17
    • 1970-01-01
    • 2018-05-05
    • 2019-11-17
    • 2022-06-11
    • 1970-01-01
    • 1970-01-01
    • 2020-11-14
    相关资源
    最近更新 更多