Hi,
I'm using Eclipse Gallieo on Mac OS 10.6.8 with the Flash Builder 4 plugin. My project is using the Flex 4.5.0 SDK and I recently updated FlexUnit from 4.0 to 4.1.0-8. Now when I compile I get four errors:
I can still run my unit tests if I tell Flash Builder to ignore the errors and everything seems okay but this is a) annoying and b) indicative of something being wrong somewhere. So my question is: what do I need to do to resolve this? Or what could be the cause of this?
Hi,
My college and I have the same issue.
On his box it will compile after a clean but not on mine.
We are both running Win7 64 bit, Flash builder 4.5, FlexUnit 4, and Flex SDK 4.1
Any help much appreciated...
Errors below:
Description Resource Path Location Type
1046: Type was not found or was not a compile-time constant: [flash.events]::IEventDispatcher. CalcTests Unknown Flex Problem
1046: Type was not found or was not a compile-time constant: [org.flexunit.async]::IAsyncTestResponder. CalcTests Unk nown Flex Problem
1046: Type was not found or was not a compile-time constant: [org.flexunit.internals.runners.statements]::IAsyncHandlingStatement. CalcTests Unknown Flex Problem
1046: Type was not found or was not a compile-time constant: [org.flexunit.internals.runners.statements]::IAsyncStatement. Cal cTests Unknown Flex Problem
1046: Type was not found or was not a compile-time constant: AsyncResponseEvent. CalcTests Unknown Flex Problem
1046: Type was not found or was not a compile-time constant: AsyncTestResponder. CalcTests Unknown Flex Problem
1046: Type was not found or was not a compile-time constant: FlexEnvironmentBuilder. CalcTests Unknown Flex Problem
1046: Type was not found or was not a compile-time constant: FlexMXVisualTestEnvironment. CalcTests Unknown Flex Problem
1046: Type was not found or was not a compile-time constant: ISequenceAction. CalcTests Unknown Flex Problem
1046: Type was not found or was not a compile-time constant: ISequencePend. CalcTests Unknown Flex Problem
1046: Type was not found or was not a compile-time constant: ISequenceStep. CalcTests Unknown Flex Problem
1046: Type was not found or was not a compile-time constant: SequenceBindingWaiter. CalcTests Unknown Flex Problem
1046: Type was not found or was not a compile-time constant: SequenceCaller. CalcTests Unknown Flex Problem
1046: Type was not found or was not a compile-time constant: SequenceDelay. CalcTests Unknown Flex Problem
1046: Type was not found or was not a compile-time constant: SequenceEventDispatcher. CalcTests Unknown Flex Problem
1046: Type was not found or was not a compile-time constant: SequenceRunner. CalcTests Unknown Flex Problem
1046: Type was not found or was not a compile-time constant: SequenceSetter. CalcTests Unknown Flex Problem
1046: Type was not found or was not a compile-time constant: SequenceWaiter. CalcTests Unknown Flex Problem
1046: Type was not found or was not a compile-time constant: TextListener. CalcTests Unknown Flex Problem
1046: Type was not found or was not a compile-time constant: VisualTestEnvironmentBuilder. CalcTests Unknown Flex Problem
I get the similar errors;
1046: Type was not found or was not a compile-time constant: [flash.events]::IEventDispatcher.
1046: Type was not found or was not a compile-time constant: [org.flexunit.internals.runners.statements]::IAsyncHandlingStatement.
1046: Type was not found or was not a compile-time constant: [org.flexunit.internals.runners.statements]::IAsyncStatement.
I am on FlexUnit 4.0 and FlexSDK 4.0 in Flash Builder 4.5 Standard.
But the test seem to run.
Anyone know why its doing this?
Andi
To follow up, I'm still experiencing this issue but only intermittently. I've noticed that when I get the errors my FlexUnit application does not actually compile correctly so it cannot be run. By cleaning my project I'm typically able to get everything to compile with no errors and then the tests seems to run fine.
My typical workflow right now is to build my project. If I don't get the errors mentioned in the OP I run my tests. If I get the errors I clean my project and the errors go away and I run my tests.
Guys,
Have you ever tried to change the swc path from version4libs to version3libs in Library Path view of FB? If you're using FB4.5+ , the default path will be version4libs.
I encountered this issue days ago, yes , clean and re-run test is OK; but getting annoying if you gonna run tests many times.
Hope this helps.
Robert
Thanks Robert,
This seemed not to work to start with but after many cleans and builds (it seems not to always do cleans thoroughly on this project) the errors have gone away.
They did occasionally disappear before, so I will post again if the problem reoccurs (currently I’m on a different project so may not be soon)
My actions were as follows:
Repoint relevant paths in Project -> properties -> Flex Build Path from version4libs to version3libs, on all the related projects. Clean and build about 20 times till errors go away and the build manages to produce the HTML file to launch.
And it has now been working for about 10 cleans and builds.
Dan
Here's what I found solved it for me. I had the exact same error today on Win7 64-bit, with the newest Flash Builder 4.5.1 and importing an existing project.
I had the FlexUnit4.swc in my libs folder as well as the built in libraries in the build path so I:
Not sure if I really need it in there but I'm working in a team environment using P4. Some team members are not using the newest Flash Builder, so I keep it there. Do you have the same scenario, where you have the swc in your libs folder?
I was getting the following 4 errors when right-clicking a FlexUnit testcase and choosing "Execute FlexUnit Tests" using FB 4.5:
1046: Type was not found or was not a compile-time constant: [flash.events]::IEventDispatcher.
1046: Type was not found or was not a compile-time constant: [org.flexunit.async]::IAsyncTestResponder.
1046: Type was not found or was not a compile-time constant: [org.flexunit.internals.runners.statements]::IAsyncHandlingStatement.
1046: Type was not found or was not a compile-time constant: [org.flexunit.internals.runners.statements]::IAsyncStatement
To solve this, I made sure "Build Automatically" was ticked in "Project" options.
I am having the same error, 1046, for which you offered a solution in your September 27 post. It seems that Flashbuilder has decided that the type "int" will not compile for me. I am using Flashbuilder 4.6. As stated in your post, I have found flexunit-4.1.0-8-flex_4.1.0.16076.swc but I do not see a fluint library. What is this?
North America
Europe, Middle East and Africa
Asia Pacific