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

时间:2018-06-25 06:47:00

标签: 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'

1 个答案:

答案 0 :(得分:2)

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

因此,只需添加另一个引用animation-vector-drawable的实现即可:

implementation 'com.android.support:animated-vector-drawable:27.1.1'

确保将google()存储库包含在顶级build.gradle