Gradle error shows “Could not resolve all files for configuration ‘:app:debugRuntimeClasspath’.”

Solution for Gradle error shows “Could not resolve all files for configuration ‘:app:debugRuntimeClasspath’.”
is Given Below:

When I build the project the error says,

  • What went wrong:
    Execution failed for task ‘:app:mergeDebugNativeLibs’.

Could not resolve all files for configuration ‘:app:debugRuntimeClasspath’.
Could not find com.android.support:multidex:2.0.1.

my app build.gradle looks like this;

apply plugin: 'com.android.application'

apply plugin: ‘kotlin-android’
apply plugin: ‘kotlin-android-extensions’
apply plugin: ‘com.google.gms.google-services’

android {
compileSdkVersion 31
buildToolsVersion ‘30.0.3’

defaultConfig {
    applicationId "com.example.derepostelouest"
    minSdkVersion 19
    targetSdkVersion 30
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

    multiDexEnabled true
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
    jvmTarget="1.8"
}

}

dependencies {

implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.6.0'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.firebase:firebase-auth:19.2.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.android.support:multidex:2.0.1'

implementation platform('com.google.firebase:firebase-bom:28.3.0')

implementation 'com.google.firebase:firebase-analytics-ktx'
implementation 'com.google.firebase:firebase-auth-ktx'

implementation 'com.google.firebase:firebase-storage-ktx'
implementation 'com.google.firebase:firebase-database-ktx'

// Cardview Library

implementation 'androidx.cardview:cardview:1.0.0'

}

Please someone somewhere help, I’m going nuts…
I have crossed the whole internet unsuccessfully.