Home > Blockchain >  Could not find com.androidx.multidex:multidex:2.0.1
Could not find com.androidx.multidex:multidex:2.0.1

Time:09-27

> Could not resolve all files for configuration ':app:debugCompileClasspath'.
   > Could not find com.androidx.multidex:multidex:2.0.1.
     Required by:
         project :app

I'm getting this error after I added multidex in my project

CodePudding user response:

Try

implementation "androidx.multidex:multidex:2.0.1"

CodePudding user response:

build.gradle (Module)-> This defines the module-specific build configurations.

build.gradle (Project)-> This defines your build configuration that apply to all modules. This file is integral to the project, so you should maintain them in revision control with all other source code.

You should add below Module Level build.gradle (android/app/build.gradle) section.

dependencies {

    implementation 'androidx.multidex:multidex:2.0.1'
}

FYI

Please remove multiDexEnabled = true from project level build.gradle section

Modify the module-level build.gradle file to enable multidex and add the multidex library as a dependency, as shown here:

android {
    defaultConfig {
    applicationId "com.app"
    minSdkVersion rootProject.ext.minSdkVersion
    targetSdkVersion rootProject.ext.targetSdkVersion
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
    }
}

CodePudding user response:

implementation 'androidx.multidex:multidex:2.0.1' not implementation 'com.androidx.multidex:multidex:2.0.1'

  • Related