[英]Unable to compile minecraft mod: Could not resolve all files for configuration ':classpath'
I was downloading a mod from GitHub (Tetra pack https://github.com/Noobulus/Tetra-Pak/tree/1.18 ) because the 1.18 version was not yet released as a compiled jar.我正在从 GitHub(利乐包https://github.com/Noobulus/Tetra-Pak/tree/1.18 )下载一个 mod,因为 1.18 版本尚未作为编译后的 Z68995FCBF432492DAC40Z8 发布。 I ran the
gradlew build
but It threw this error我运行了
gradlew build
但它抛出了这个错误
A problem occurred configuring root project 'Tetra-Pak-1.18'.
配置根项目“Tetra-Pak-1.18”时出现问题。 Could not resolve all files for configuration ':classpath'.
无法解析配置 ':classpath' 的所有文件。 Could not resolve com.github.gmazzo:gradle-buildconfig-plugin:3.0.1.
无法解析 com.github.gmazzo:gradle-buildconfig-plugin:3.0.1。 Required by: project: > com.github.gmazzo.buildconfig:com.github.gmazzo.buildconfig.gradle.plugin:3.0.1 Could not resolve com.github.gmazzo:gradle-buildconfig-plugin:3.0.1.
Required by: project: > com.github.gmazzo.buildconfig:com.github.gmazzo.buildconfig.gradle.plugin:3.0.1 Could not resolve com.github.gmazzo:gradle-buildconfig-plugin:3.0.1. Could not get resource 'https://dist.creeper.host/Sponge/maven/com/github/gmazzo/gradle-buildconfig-plugin/3.0.1/gradle-buildconfig-plugin-3.0.1.pom'.
无法获取资源“https://dist.creeper.host/Sponge/maven/com/github/gmazzo/gradle-buildconfig-plugin/3.0.1/gradle-buildconfig-plugin-3.0.1.pom”。 Could not HEAD 'https://dist.creeper.host/Sponge/maven/com/github/gmazzo/gradle-buildconfig-plugin/3.0.1/gradle-buildconfig-plugin-3.0.1.pom'.
无法 HEAD 'https://dist.creeper.host/Sponge/maven/com/github/gmazzo/gradle-buildconfig-plugin/3.0.1/gradle-buildconfig-plugin-3.0.1.pom'。 Read timed out
读取超时
here is the buildscript from build.Gradle.这是来自 build.Gradle 的构建脚本。
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
mavenCentral()
maven { url = 'https://dist.creeper.host/Sponge/maven' }
maven { url = 'https://repo.spongepowered.org/maven' }
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
classpath group: 'org.spongepowered', name: 'mixingradle', version: '0.7-SNAPSHOT'
}
}
Solved!解决了! I just removed the dependency that was giving the error from build.gradle .
我刚刚从build.gradle中删除了导致错误的依赖项。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.