【发布时间】:2021-07-31 03:17:18
【问题描述】:
所以我有 Lottie animationView 的闪屏和下面的 xml 文件
但 IDE 说
Cannot resolve class com.airbnb.lottie.LottieAnimationView
问题是我可以在调试和 Splash 内容中运行我的应用程序,完美地显示内容 当我想在发布版本中构建时它不能因为错误:LottieAnimationView 必须扩展 android.view.View [Instantiatable]
我正在关注此处列出的官方文档official lottie doc 并且没有任何问题,并且在调试版本中显示 Splash
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:lottie_autoPlay="true"
app:lottie_rawRes="@raw/splash_cat"
app:lottie_loop="true"
app:lottie_speed="1.00" />
</androidx.constraintlayout.widget.ConstraintLayout>
edit1:我正在使用颤振并遵循此示例flutter Lottie Splash
【问题讨论】:
标签: android xml flutter kotlin lottie