gradle build.gradle问题的“版本:”(伪造修改)

dba5bblo  于 2021-08-25  发布在  Java
关注(0)|答案(1)|浏览(426)

我是1000000000%新的编码锻造mods。我正在尝试运行此命令:./gradlew setupdecompospace在遍历文件路径后,我在终端中键入了此命令。我收到以下错误消息:


* What went wrong:

Could not compile build file '/Users/fred/Desktop/Mods-In-Progress/LearningMod/build.gradle'.
> startup failed:
  build file '/Users/fred/Desktop/Mods-In-Progress/LearningMod/build.gradle': 15: unexpected token: 16.5 @ line 15, column 13.
     version =‘1.16.5-1.0.0’
                     ^

  1 error

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 5s
FC-MBP3-3:LearningMod MYNAME$

我的build.gradle文件是这样的(顺便说一句,我没有展示全部内容):

buildscript {
    repositories {
        maven { url = 'https://maven.minecraftforge.net' }
        mavenCentral()
    }
    dependencies {
        classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '4.1.+', changing: true
    }
}
apply plugin: 'net.minecraftforge.gradle'
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
apply plugin: 'eclipse'
apply plugin: 'maven-publish'

version =‘1.16.5-1.0.0’
group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'modid'

因此,我的问题是如何修复错误消息。我已经尝试了我能想到的一切。我将学习本教程:https://www.youtube.com/watch?v=jfvfqzo5t5q 谢谢,creativedrone还有,我有一个旧mac。在操作系统10.8版左右,owo很快就会有一个新版本好的,所以有人修复了这个问题,但我仍然得到一个错误代码,错误代码在注解中。

c6ubokkw

c6ubokkw1#

你需要使用 ''‘’ . 将该行替换为 version ='1.16.5-1.0.0' .

相关问题