Android: run with rebuild option?

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

thanks,

larry

7 comments
Comment actions Permalink

File | Invalidate Caches only exists as a workaround for cache corruption issues in IntelliJ IDEA, and takes effect only after restarting the IDE. Obviously this is not an option which can, or should, be used in a normal development workflow.

There is no option to run with rebuild either. The best thing for you to do would be to file a YouTrack issue describing how the problem can be reproduced, so that we could investigate and fix it.

0
Comment actions Permalink

Thanks for clarifying Invalidate Cache.  

I went to jetbrains.com, and then 'support' at http://www.jetbrains.com/support/idea/index.html  but I see no mention of how to file a bug.  How do I get there?

thanks,

larry

0
Comment actions Permalink

Thanks, I added bug report http://youtrack.jetbrains.com/issue/IDEA-85479

Is there a way to add the URL for the bug tracker to the support page?

0
Comment actions Permalink

There is one already: "IntelliJ IDEA Issue Tracker" in the "Related links" box.

0
Comment actions Permalink

Ah, thanks.  I searched for "bug".

0
Comment actions Permalink

This dirty-build bug reappeared with Leda 120.11

I posted a comment on the closed bug http://youtrack.jetbrains.com/issue/IDEA-85479

Is it possible to reopen that bug, or is a new one required?

thanks,

larry

0

Please sign in to leave a comment.