2

I have a project on Android Studio, but it's not compiling because of this error:

bootstrap class path not set in conjunction with -source 1.6

I've searched and I understand that it is a problem with JDK, but how can I fix it inside Android Studio? The version of java running is 1.8.

android/build.gradle

 jdt {
    sourceCompatibility = 1.6
    targetCompatibility = 1.6
}
defaultConfig {
    applicationId "com.mygdx.game"
    minSdkVersion 9
    targetSdkVersion 27
    versionCode 1
    versionName "1.0"
 }

desktop/build.gradle

apply plugin: "java"

sourceCompatibility = 1.6
sourceSets.main.java.srcDirs = [ "src/" ]

Thanks for the help.

IsadoraVR
  • 57
  • 9
  • 1
    Possible duplicate of [warning: \[options\] bootstrap class path not set in conjunction with -source 1.5](https://stackoverflow.com/questions/7816423/warning-options-bootstrap-class-path-not-set-in-conjunction-with-source-1-5) – Saeed Zhiany Oct 27 '18 at 04:15
  • I tried typing those things in the command line, but it didnt work. – IsadoraVR Oct 27 '18 at 12:25

1 Answers1

0

Same problem with Android Studio 3.4.1 when adding module in the dependecies but just typed as a build warning and not as a compilation error.

Changing sourceCompatibility = "8" and targetCompatibility = "8" in the gradle.build of the module fix it.