I get a warning message at Build time in my gradle console:
warning: [options] bootstrap class path not set in conjunction with -source 1.7 1 warning
How can I fix this?
Any help is appreciated!
I get a warning message at Build time in my gradle console:
warning: [options] bootstrap class path not set in conjunction with -source 1.7 1 warning
How can I fix this?
Any help is appreciated!
Simply put the following code inside the buildscript
tag of the project level build.gradle
:
tasks.withType(JavaCompile) {
targetCompatibility = '1.7'
sourceCompatibility = '1.7'
options.setBootClasspath("PATH_TO_JAVA_7_JRE/lib/rt.jar")
}
Just make sure to replace PATH_TO_JAVA_7_JRE
with the path to yours.
I've struggled with this issue myself a couple of weeks now and finally come up with a solution, which hopefully works for others as well. Hope it helps!
If using Android Studio and no other requirement is set on the version of the JDK maybe you can choose to use the embedded JDK: