“无法解析所有配置文件”:classpath“android studio中出现错误

ntjbwcob  于 2021-06-30  发布在  Java
关注(0)|答案(1)|浏览(429)

错误
我今天就犯了这个错误。
安卓工作室说 com.google.jimfs:jimfs:1.1. 无法下载。
这是我的毕业证书

// 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. 我自己还是grad尔档案里少了什么?

5w9g7ksd

5w9g7ksd1#

//build.gradle(项目:你的应用程序)

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(模块:app)

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'
}

相关问题