Optimize imports on the fly for all projects in Android Studio/IntelliJ

Viewed 807

Is there a way to optimize imports on the fly for all projects, not just 'for current project' in Android Studio/IntelliJ?

Expected

Optimize imports to be enabled when opening an existing project and/or when creating new projects.

Observed

Add unambiguous imports on the fly is IDE-level settings. However, Optimize imports on the fly does not appear to be as the parenthesis state for current project. I've tested this by creating a new project and opening the settings. As expected, Add unambiguous imports on the fly is selected while Optimize imports on the fly is not selected.

The current IntelliJ documentation, Auto imports, does not provide a solution.

enter image description here

Attempted solution

Enable Optimize imports on the fly (for current project) under Preferences for New Projects...

This produced the same observed result above.

enter image description here

enter image description here

This has also been added to the IntelliJ community forum.

1 Answers

Unfortunately, it's not possible until IDEA-237002 is fixed.

Related