gpt4 book ai didi

java - Minecraft forge mod编译错误

转载 作者:行者123 更新时间:2023-11-29 07:40:02 26 4
gpt4 key购买 nike

我已经制作了一个模组,现在我想编译它,我按照教程尝试编译,但是我遇到了错误。请告诉我我做错了什么。谢谢。

终端:

* Where:
Build file '/Users/Will/Dropbox/forge/build.gradle' line: 20

* What went wrong:
Could not compile build file '/Users/Will/Dropbox/forge/build.gradle'.
> startup failed:
build file '/Users/Will/Dropbox/forge/build.gradle': 20: Invalid variable name. Must start with a letter but was: “1”
. At [20:11] @ line 20, column 11.
version = “1”
^

1 error


* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

BUILD FAILED

Total time: 6.669 secs

构建等级:

buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
}
}

apply plugin: 'forge'

version = “1”
group = “com.candymod.mincoder”
archivesBaseName = “Candymod”

minecraft {
version = "1.7.10-10.13.2.1230"
runDir = "eclipse"
}

dependencies {
// you may put jars on which you depend on in ./libs
// or you may define them like so..
//compile "some.group:artifact:version:classifier"
//compile "some.group:artifact:version"

// real examples
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env

// for more info...
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/dependency_management.html

}

processResources
{
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version

// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'

// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
}

// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}

如果您决定提供帮助,谢谢。

最佳答案

如果您使用的是 ,我假设你来自你的路径并使用可怕的 TextEdit 程序,然后你需要进入设置和 turn off "smart quotes" . TextEdit 中的“智能引号”功能会在您键入时自动将普通引号 " 替换为引号

version = “1”

应该是

version = "1"

细微差别,但它就在那里。无论在何处使用这些,您都会遇到同样的问题,例如

group = “com.candymod.mincoder”
archivesBaseName = “Candymod”

长期解决方案

获取面向编码的编辑器,例如 Sublime取代您对 TextEdit 的使用,它具有许多优势,包括导航和语法着色,使编码更容易。

关于java - Minecraft forge mod编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31242615/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com