微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

AnimatedVectorDrawable在Android 8.0.0上未运行

如何解决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'
}

请告知我是否缺少某些东西

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。