Is there a way to, in one keystroke, run with a forced rebuild? Doing a Build/Rebuild Project command will rebuild, but it will finish without launching. I don't see an option to force rebuild for a Run/Run command. The File/Invalidate Caches... command requires interaction. I always want to invalidate caches without restarting Idea, so I'd rather there be no interaction.
Why would I need this full rebuild? Unfortunately, for Android projects, Idea seems to have gotten poor, in v10 and v11, for detecting changes to Android resources. If you edit a resource within Idea, there's a chance it will pick it up as dirty, but not always. And if the resource is touched outside of the editor, it is likely that the build process will not notice the change upon switching to a new project that uses (for example) a library that has been changed.
The typical symptom of this failure to notice dirty resources is a build that runs and immediately causes on error on one of the first R.id.<ref> references.
So a core solution would be a build process that notices dirty resources without fail.
A workaround for now would be any of the following:
* A File/Invalidate Caches that doesn't require interaction (but that would be 2 commands, to invalidate then run)
* A Run that has an option to rebuild