Failed to resolve: multidexultidex和Failed to resolve: multidex-instrumentation

Failed to resolve: multidexultidex和Failed to resolve: multidex-instrumentation

Gradle 编译出现以下问题:
在这里插入图片描述

点击OpenFile会到app的gradle下,观察发现与multdex有关的只有这两个

defaultConfig {
        multiDexEnabled true
        applicationId "com.txooo"
        minSdkVersion 15
        targetSdkVersion 26
        。。。。
    }

dependencies {
    compile 'com.android.support:multidex:1.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    。。。。
}

解决办法:

  1. multiDexEnabled true 这一行删掉
  2. compile ‘com.android.support:multidex:1.0.0’ 改成项目建议的版本(可改可不改

猜你喜欢

转载自blog.csdn.net/weixin_37322501/article/details/83750054