When attempting to import a Gradle project, I receive the following error:
Cannot determine classpath for resource 'java/sql/SQLException.class' from location 'jrt:/java.sql/java/sql/SQLException.class'.
The project uses Gradle 2.14 which is incompatible with IDEA running on Java 10 or newer.
See details at https://github.com/gradle/gradle/issues/8431
Possible solution:
- Upgrade Gradle wrapper to 4.8.1 version and re-import the project
While there are already posted solutions to this error, I have tried them all without any success. Namely, I've tried:
- File > Project Structure > Project > Project SDK > 1.8 (java version "1.8.0_231")
- File > Project Structure > Project > Project language level > SDK default (8)
- File > Project Structure > Modules > (ensure that every applicable Module SDK and Language level were set correctly)
- File > Settings > Build, Execution, Deployment > Build Tools > Gradle > Gradle JVM > Use Project JDK (1.8.0_231)
- File > Settings > Build, Execution, Deployment > Compiler > Project bytecode version > 8
- File > Other Settings > Project Structure for New Projects > Project Settings > Project > Project SDK > 1.8
...all to no avail.