I' trying to build a in IntelliJ IDEA project that is not mine and I got the following error:
java: diamond operator is not supported in -source 1.6 (use -source 7 or higher to enable diamond operator)
How do I change this setting in IntelliJ IDEA?
From the main menu, select File | Project Structure Ctrl+Alt+Shift+S . Under Project Settings, select Modules | Sources. From the Language level list, select the necessary option. To use the project language level, select Project default.
To configure project settings, select IntelliJ IDEA | Preferences on macOS or File | Settings on Windows and Linux from the main menu. Alternatively, you can press Ctrl+Alt+S to show the IDE settings. icon. Other settings are global and apply to all existing projects.
Ctrl+Alt+Shift+S (Project Structure icon)
Then change Project language level
I know the OP uses IntelliJ IDEA, but Android Studio is based on IntelliJ IDEA, so I wanna say one more word.
If you use Android Studio, command+;
(for Mac) or File->Project Structure
, then in the open window follow the settings:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With