Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ Android cache build with drawables ignores changes

I have a minor issue with the way IntelliJ caches files or builds (not sure about terminology here).

Situation Abstract:

Library module

  • DrawableA
  • DrawableB

App module

  • DrawableA

Assume library images are black and white, App ones are color.
The app shows (correctly) the colorful A.
The app shows (correctly) the black and white B (means its missing).
Now I add an image to App project, Drawable B, in color.

  • If you simply press "run" he will keep using black and white B
  • If you "rebuild project" he will use the correct one
  • If you try "Make" and "Compile" manually on Lib and App NO EFFECT

To clarify, this issue is really special. It only occurs if the DrawableB is NOT present in the App module. If you have it, but the WRONG one, and you update it, it works. I assume its an internal caching of IntelliJ, and he does not recognize that I added a drawable (and he has to use it from the App now, not the LIB). Perhaps its something in the google build of Android projects, not enough info about the internal here...

I know, the obvious tip is "do a rebuild of the whole project" - that said, I have 18 App modules, each for one App. The rebuild takes forever (on one of our machines without SSD), and its not neccessary. If I change something in e.g. AppX, I only need to rebuild AppX and the Library. But there seems to be no option for it.

Does anyone know a workaround, like deleting BIN or other cache folders via script? Cant split up the modules in different "projects", would loose refactoring capabilities.

Crosspost here, check before wasting time to answer (this site here is more frequented and faster, but this issue is so specific, cant hurt to ask the developers too)
http://devnet.jetbrains.net/message/5446674

like image 860
Christian Ruppert Avatar asked Dec 16 '11 14:12

Christian Ruppert


1 Answers

Try to rebuild project. Smtm i have same problem and it helps me.

like image 62
resource8218 Avatar answered Nov 15 '22 19:11

resource8218