I faced similar issue, I had to go and un-check "Use '--release' option for cross-compilation (java 9 and later) under File > Settings > Build, Execution, Deployment > Compiler > Java Compiler