February 3, 2012

FlashBuilder, the yellow question marks, the import “foo.bar” could not be found – find touch as a temporary workaround?

Filed under: flash, flash builder — Tags: , , , , , , , — michaelangela @ 11:22 pm

I was working on a Flash Pro project, coding in FlashBuilder. The way to go. The nearest I can tell is when running a debug build for some reason the project lost something. The legendary yellow squiggles with the ? marks appeared all over the place. I couldn’t get it to go away. It’s in git so I just checked it out in a new folder without the project files and could keep moving. After another debug build, it happened again. Not sure on that bit. But I found that doing ANY change in the file and saving the imported file would suddenly make the file usable again.

import com.foo.bar.MyClass

Open up MyClass and do anything that allows FlashBuilder to save it. The quickest was space/delete/save. If you have FlexFormatter on make sure auto format isn’t on if you don’t want to reformat 3rd party libraries when doing this. So it seemed that anything you change, so that it saves, brings the file back into FlashBuilder’s list of valid imports. But when you close the project and reopen it, the invalid imports are back.

That got me to thinking… if I just touch the file would that do it? It did. Now we’re in business.

find . -type f -print0 | xargs -0 touch

That did the trick. All the files are back in business. It’ll happen again but at least I have a quick way to get it working so refactoring, finding usages, hiearchy and all that goodness works again.

This is FlashBuilder 4.5.1.

Blog at WordPress.com.