android - AnimatedVectorDrawable 未在 Android 8.0.0 上运行
问题描述
我一直在测试AnimatedVectotDrawable API 来为矢量绘图设置动画,当我在 Android 8.0.0 物理设备上运行它时它只显示动画的结尾(无动画)。
我在 Android Q AVD 上进行了测试,它运行良好。这是我的 Gradle 脚本:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.nic"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation 'com.google.android.material:material:1.0.0'
}
请告知我是否遗漏了什么
解决方案
推荐阅读
- android - 谷歌脚本:在一个项目中使用 MIT App Inventor 的多个 doPost
- go - 无法使用“go mod vendor”从 Kubernetes 集群连接到 Go 代理
- python - 通过过滤 sql 中的特定变量值从 cursor.execute(sql) 获取数据到 python 列表
- oracle - 如何创建批处理以将 Oracle 数据库数据上传到 AWS Data Exchange?
- python-3.x - 如何在 Pandas 中转换日期时间?
- mariadb - 错误!找不到 MariaDB 服务器 PID 文件
- google-cloud-platform - GCS 存储桶应该只能由特定人员访问
- c# - Azure 搜索 v11:索引复杂类型的可为空集合
- flutter - 如何在颤振中进行多页运行(应用程序)?
- spring - 如何在没有 Reactive 的情况下使用 Spring Cloud Gateway?