Reputation: 804
I just upgraded from Flash Builder 4 to 4.5 and have imported one of my FB 4 projects. I am now seeing an orange question mark in the gutter next to all of my import statements that are importing local classes (as well as everywhere the said class methods are used) and an orange underline appears under the import statement. When I hover over the underline it says that the import could not be found.
The project compiles and runs without a problem (I use ANT to build this project).
If I open one of the class files in question then change something (i.e press space bar) and hit save (EDIT: actually found I don't have to even save, just opening causes FB to find it) then go back to the file importing it the orange question mark is gone for that import, I get the code assist and CTL+Click links me to the class file. However, if I close that file and reopen it again cannot find the class file.
The classes in question are stored under my project's src dir as:
- src
+---com
+---myappname
+---services
+---utils
etc...
and my import statements look like:
import com.myappname.utils.*;
import com.myappname.services.remoteService;
Any ideas? Is this a FB 4.5 "enhancement"? I've tried deleting and re-importing the project, refreshing the project and am now kind of at a loss of what to do. It's annoying enough that I may need to downgrade to 4.
Upvotes: 3
Views: 6323
Reputation: 41
Had the same problem with a project I created in Flash Professional CS 5.5 and imported into Flash Builder 4.6 as shown in this tutorial: http://www.adobe.com/devnet/flash-builder/articles/sharing-projects-flashbuilder-flash.html.
Found out that in Flash Builder the project didn't have any reference to the Flex SDK, so from Flash Builder I chose Project->Properties->ActionScript Build Path and hit the 'Add Flex SDK' button.
This immediately got rid of the issue, moreover did it reenable the code completion in Flash Builder since it now could find the imports.
BTW. I'm on XP.
Cheers, Claus
Upvotes: 4
Reputation: 2796
I managed to solve this issue, it really aggrivated me for a while but for some reason Flash Builder has some issue with finding them..
My fix was just opening the files, I don't have many classes the application is quite simple but its an easy fix.
Upvotes: 0
Reputation: 804
Fixed!
The project in question is a Flex/Air application and includes a folder inside the default "src" folder that houses a web application server (railo) that runs locally when the Air app is launched to provide "server side" functionality to the Air client. This folder was only in the src folder so that it would be packaged in the Air installer. However, I found that if I remove the directory, all my import references start to work just fine.
I still needed the folder inside src folder so that it would package properly, so I simply moved it to the project root (outside of src) then created a "link" to it in the src folder. This keeps my import references intact, and includes the folder in the exe build.
I'm not sure why including that folder causes this problem (it does not include any AS3 or MXML files), but I'm thrilled that it was an easy fix.
Upvotes: 2
Reputation: 15636
Just faced the exact same problem.
Well have to say, I was expecting the solution to this problem somewhere on the Internet.
Anyways,
here's the reason- The project you imported was created using an older version of the Flex sdk(possibly 3.5 or something). Flash Builder 4.5 supports sdks from 3.6 & upwards. And, that's where your problem lies.
Here is the solution-
Goto Project > Properties > Select 'ActionScript Compiler'.
In the dialog box on right-hand side, under 'Use a specific SDK' select Flex 3.6 or higher.
It will show a confirmation box when you apply these settings informing about the changes it will cause. Do not bother just Apply the changes and Voila!
It comes back to life :)
Hope that helps!
Upvotes: 0
Reputation: 6485
Look into your projects build files (.flexlibproperties or .actionScriptProperties) to see if something's abnormal. (Duplicate entries etc).
Upvotes: 1