1

I have a Java project in VSCode that is failing to build via Gradle and WPILib (FRC code).

This is a screenshot of my terminal while trying to build. I've seen replies that say it's a problem with the JAVA_PATH variable, but that can't be it because this code is failing to build on multiple devices. It seems to be a problem with the software itself, has anyone had this problem before or have suggestions about how to fix it? I've checked my vendor libraries, all of them are up to date (the only one relevant here is REV Robotics, and that's the correct version.

ShashJar
  • 31
  • 3
  • 1
    Possible duplicate of [Class file has wrong version 52.0, should be 50.0](https://stackoverflow.com/questions/28180915/class-file-has-wrong-version-52-0-should-be-50-0) – CollinD Jan 25 '19 at 22:04

1 Answers1

1

This errors say, that the classes inside SparkMax-java-1.0.27.jar were compiled with a newer Java compiler (Java 11) and your Gradle Build compiles with a Java 8 compiler. You have to set your Gradle build to compile with Java 11.

Should be build.gradle

apply plugin: 'java'
sourceCompatibility = 11
targetCompatibility = 11