本文介绍了“无法解析配置':classpath'的所有文件."Android Studio中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误

我今天才收到这个错误.

I am getting this error just today.

Android Studio说 com.google.jimfs:jimfs:1.1.无法下载.

Android studio is saying com.google.jimfs:jimfs:1.1. can't be downloaded.

这是我的礼物

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

仅当我从网络上下载项目时,才会发生这种情况.如果我创建项目,则一切正常.

This only occurs if I download a project from the web. If I create the project then everything works fine.

我应该自己下载 com.google.jimfs:jimfs:1.1.还是在gradle文件中丢失任何内容?

Should I download com.google.jimfs:jimfs:1.1. myself or is anything missing in my gradle file?

推荐答案

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

// build.gradle (Project: 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(模块:应用)

// build.gradle (Module: 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'
}

这篇关于“无法解析配置':classpath'的所有文件."Android Studio中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 15:30