Gradle同步失败:原因:com.android.builder.errors.EvalIssueReporter

时间:2018-11-27 19:27:30

标签: android android-studio gradle repository build.gradle

我最近安装了Android Studio 3.1.3,我下载了Gradle v4.4和Gradle插件v3.1.3。我的build.gradle如下所示:

/ Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
    maven {
        url 'http://repo.metova.com/nexus/content/groups/public'
    }
    maven {
        url 'https://nexus.xebialabs.com/nexus/content/groups/public'
    }
    mavenCentral()

    maven {
        url 'https://oss.sonatype.org/content/repositories/snapshots'
    }

    maven {
        url "https://plugins.gradle.org/m2/"
    }
    maven {
        url 'repo1.maven.org/maven2'

    }
    maven {
       url 'central.maven.org/maven2'
    }

    //google()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.1.3'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
    maven {
        url 'http://repo.metova.com/nexus/content/groups/public'
    }
    maven {
        url 'https://nexus.xebialabs.com/nexus/content/groups/public'
    }
    mavenCentral()
    maven { url "https://jitpack.io" }
    //google()
    maven {
       url 'repo1.maven.org/maven2'

    }
     maven {
        url 'central.maven.org/maven2'
    }

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

}

我正在使用其他存储库,因为我无法访问jcenter()或google()。当我同步Gradle项目时,所有依赖项都下载成功,但是出现错误:

Unable to load class 'com.android.builder.errors.EvalIssueReporter'.
Possible causes for this unexpected error include:<ul><li>Gradle's
dependency cache may be corrupt (this sometimes occurs after a network 
connection timeout.) 
Re-download dependencies and sync project (requires network)</li><li>The
state of a Gradle build process (daemon) may be corrupt. Stopping all
Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)</li><li>Your project may
be using a third-party plugin which is not compatible with the other
plugins in the project or the version of Gradle requested by the project.
/li></ul>In the case of corrupt Gradle processes, you can also try
closing the IDE and then killing all Java processes.

我已经执行了两项操作,但它们对我不起作用。请帮助我,我只是一个渴望学习的古巴程序员。

0 个答案:

没有答案