簡體   English   中英

“無法解析配置 ':classpath' 的所有文件。” android 工作室中的錯誤

[英]“Could not resolve all files for configuration ':classpath'.” error in android studio

錯誤

我今天才收到這個錯誤。

Android 工作室說com.google.jimfs:jimfs:1.1. 無法下載。

這是我的 gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        google()
        maven { url 'https://maven.google.com' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
    }
}

allprojects {
    repositories {
        google()
        maven { url 'https://maven.google.com' }
    }
}

ext {
    compileSdkVersion = 22
    buildToolsVersion = "23.0.1"

    minSdkVersion = 9
    targetSdkVersion = 23
}

僅當我從 web 下載項目時才會發生這種情況。 如果我創建項目,那么一切正常。

我應該下載com.google.jimfs:jimfs:1.1. 我自己還是我的 gradle 文件中缺少任何內容?

// build.gradle (項目: YOUR-APP)

buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:4.0.1"
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

// build.gradle(模塊:應用程序)

apply plugin: 'com.android.application'


android {
    compileSdkVersion 30
    buildToolsVersion "30.0.3"

    defaultConfig {
        applicationId "com.parse.starter"
        minSdkVersion 14
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"
        multiDexEnabled true

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}   

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])

    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.2.1'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'androidx.navigation:navigation-fragment:2.3.2'
    implementation 'androidx.navigation:navigation-ui:2.3.2'
    implementation 'androidx.multidex:multidex:2.0.1'

    implementation 'com.parse.bolts:bolts-tasks:1.4.0'
    implementation 'com.parse:parse-android:1.13.0'
    implementation 'com.google.android.gms:play-services:12.0.1'
    implementation 'com.google.jimfs:jimfs:1.1'

    testImplementation 'junit:junit:4.13'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM