Error message:
Error:java: Compilation failed: internal java compiler error
The local Java version is inconsistent with the Java version in the project
View local Java version
> java -version
java version "1.8.0_172"
Use shortcut key Ctrl+Alt+Shift+S
to open Project Structure
1) Select Project
, modify the project Java to be consistent with the local Java version
2) Select Modules
, modify the project Java to be consistent with the local Java version
3) Modify the Java configuration in IDEA
The above picture is the main reason for the error, which is caused by the inconsistency between the Java version in the IDEA environment and the Java version in the project.