gpt4 book ai didi

gradle - java.lang.IllegalArgumentException:不支持的类文件主要版本57

转载 作者:行者123 更新时间:2023-12-03 05:30:01 25 4
gpt4 key购买 nike

我在构建应用程序时遇到了错误。任何帮助将不胜感激。

根目录:build.gradle

buildscript {
ext.kotlin_version = '1.3.50'

repositories {
google()
jcenter()

}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
jcenter()

}
}

settings.gradle
include ':app'

应用程序:build.gradle
apply plugin: 'java'

compileJava {
options.compilerArgs << '-parameters'
options.fork = true
options.incremental = true
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'com.squareup:javapoet:1.10.0'
implementation ("org.checkerframework:checker:2.1.10")
testImplementation 'org.mockito:mockito-core:3.2.0'
}

FAILURE:Build failed with an exception. *Where:Settings file'/Users/Documents/android/MyApplication5/settings.gradle' *What went wrong:Could not compile settings file'/Users/anand/Documents/android/MyApplication5/settings.gradle'.>startup failed:General error during semantic analysis:Unsupported major version 57 java.lang.IllegalArgumentException:Unsupported major version 57

1error

最佳答案

确保pom.xml文件中的目标版本和源版本相同。
编辑:Java 9+没有单独的JRE,因此请确保您的JRE路径通向您的JDK。

关于gradle - java.lang.IllegalArgumentException:不支持的类文件主要版本57,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59708363/

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