I am getting below error when i build my application.Any help would be appreciated.
Root: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'
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
Make sure both target and source version in your pom.xml file are the same. Edit: There is no separate JREs for Java 9+ so make sure your JRE path leads to your JDK.