android-studio - com.android.support:animated-vector-drawable在哪里? (Android Studio)

标签 android-studio gradle version dex

build.gradle (Module:app)中,我的implementation 'com.android.support:appcompat-v7:27.1.1'带有红色下划线,并与com.android.support:animated-vector-drawable(显然是v24)不匹配。我在项目中的任何地方都找不到名为vector-drawable的东西。只要红色标记仍然存在,该应用程序将无法启动,表明它无法使用merge dex

应用程式等级如下:

apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'



android {
    compileSdkVersion 27
    defaultConfig {
    applicationId "com.healthandchocolate.sjostedtafzelius.healthchocolateandroid"
    minSdkVersion 21
    targetSdkVersion 27
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

    }
}
}

dependencies {
//FIREBASE
implementation 'com.google.firebase:firebase-database:10.0.1'
implementation 'com.google.firebase:firebase-core:10.0.1'

//GLIDE for images
/*
compile 'com.github.bumptech.glide:glide:4.2.0'
kapt 'com.github.bumptech.glide:compiler:4.2.0'
compile 'com.android.support:support-compat:27'
annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
*/
compile 'com.master.android:glideimageview:1.0'

implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

//FORCES 27. RESOLVES VERSION CONFLICT
configurations.all {
    resolutionStrategy {
        force 'com.android.support:support-annotations:26.+'
    }
}
}

apply plugin: 'com.google.gms.google-services'
apply plugin: 'kotlin-kapt'

最佳答案

这可能是由于依赖关系造成的((很可能是您的com.master.android:glideimageview:1.0或其他)。

因此,只需添加另一个引用了animation-vector-drawable的实现即可:
implementation 'com.android.support:animated-vector-drawable:27.1.1'
确保在您的顶级google()中包括build.gradle存储库

关于android-studio - com.android.support:animated-vector-drawable在哪里? (Android Studio),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51017684/

相关文章:

android - 为什么gradle任务以错误的顺序运行?

c# - 如何获取程序集文件版本

C 系统调用 msgsnd() : invalid argument error on certain compiler versions

mysql - 向 mysql 正则表达式添加一个点

java - SoundPool puse 只能工作一次

android - 无法在 Android Studio 中切换到调试构建变体

gradle - Android Studio 中 Gradle 任务的文档

java - 如何隐藏Toast消息的显示

java - IntelliJ/Gradle 无法从 '11.0.1' 确定 java 版本

maven - 使用 Gradle 将 zip 文件发布到 Nexus (Maven)