IntelliJ IDEA error 1172 with Flex project - actionscript-3

I switched to IntelliJ IDEA for my Flex projects.
I just try to import a project in a new IntelliJ project, set up this project with the source (I can go to all my classes if I click on an occurence of the imports so the links are OK right ?), but when I try to build, I have the 1172 error with some simple classes : "Error:(19, 0) [TestProject]: Error code: 1172: Definition fr.romarin.utils:TimeUtils could not be found."
The same class imported and used in a new fresh project with the same setup is OK.
private function creationCompleteHandler(event:FlexEvent):void {
TimeUtils.formatLessThanTen(1); // works
}
So what is the problem ?
Thx a lot.

Ok so after 2 days stucked, I finally fix my problem.
I don't know why but contrary to Flash Builder and FDT to load the locales like in the Adobe doc, IntelliJ doesn't like theses commands and has his own found in this video.
After these changes, everything is OK and I could finally compile my project.

Well, I found the problem but not how to fix it yet :
It comes from my commands arguments to compile locales files :
-locale en_US fr_FR
-source-path ./src/locale/{locale}
-allow-source-path-overlap=true
As soon as I add these commands, I have got the 1172 and 1120 with some classes.
However, these commands work in Flash Builder or FDT.
So what's wrong ?
Thx.

Related

Json Simple dependency Issue

So I have been trying to import JSON Simple (https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple/1.1.1)
I am also using Visual Studio Code. So I have added the dependency in my pom.xml file, but it still wont find my imports. Do I have to add soemthing to my module-info? (fixed a different issue for me) I tried requires com.json.simple; or requires com.googlecode.json.simple; but I get the cannot be resolved to a module error. Also my project is a javafx Application, that implements server socket networks (JSON exchage).
Im at a complete los here on what to do...
Thanks for your help.
So after a lot of trial and error, i have finally fixed it. Instead of vs code I used IntelliJ and added the dependencies there. Its impotant to note, that after every import I had to restart intelliJ also make sure to press the icon as mentioned in this tutorial https://www.jetbrains.com/help/idea/work-with-maven-dependencies.html#maven_import_dependency.

MessageChannel class is inaccessable

I am trying to create a MessageChannel between two workers in a Flash project, but when I attempt to debug or publish I get an error stating "VerifyError: Error #1014: Class flash.system::MessageChannel could not be found.". I am using Flash Pro, and, as far as I know, have correctly added and selected Flash Player 11.4 as a publishing target. Does anyone know what could be causing this error?
Finally figured out the issue - I was unaware that the debugger needed to be updated separately. Since the debugger has been updated, everything seems to be working properly.

Flash Builder - Internal Build Error / Classes Must Not Be Nested

I've been working on a Flash Builder project for about a week and occasionally encounter one of these two errors when I build:
An internal build error has occurred. See the error log for more information.
1131: Classes must not be nested.
A quick Project > Clean fixes things up. When I opened my project this morning and tried to build it, I received the internal build error again. This time, however, Project > Clean results in 5 separate "Classes must not be nested" errors, all pointing to my main class declaration.
Running Project > Clean again leads back to the internal build error. If I Clean again, I get the 5 class errors again, and so on.
I'm using Flash Builder 4.6, Flex 4.6, and AIR 3.5. I haven't made any changes to my codebase since yesterday. Any ideas what might be causing this?
I had the same problem with flashb uilder 4.6,
when i try to compile the app out of the blue it says
"flash builder internal build error has occurred see the error log for more information"
to resolve this you have to check the compiler arguments
when this happens you wont be able to go to compiler argumnts GUI, you have to edit it in .actionScriptProperties file
remove -local and local names save the file and try to compile you would not get the error
to put back the local you have to rephrase the local as follows
-locale=en_US,us_EN
What worked for me was to remove all swc references from the project's compiler settings, then re-insert them.

VerifyError: Error #1014: class could not be found

I'm developing AS3 project using Flash Builder 4.5 (also with library Away3D 4.0 and Flex 4.5.1 SDK).
Also, I add my own SWC library, which I compile previously into my project.
It works find if I import class in my SWC library, however I want my swf run in a stand-alone flash player 11.
I follow this tutorial:
http://help.adobe.com/en_US/flashbuilder/using/WSe4e4b720da9dedb5-4dd43be212e8f90c222-7ffb.html
Now, I could run my app in a flash player 11, but I got an error in run time:
VerifyError: Error #1014: XXX class could not be found
And XXX is my class in SWC library. How should I fix this?
Merged into code means this, in project properties -> Flex Build Path -> Library Path -> Framework Linkage. Framework lingage has two options Merged into code and RSL. Chose Merged into code. This should solve your problem.
We had this problem when trying to build a project using a Native Extension.
Classes within the NE weren't being found at runtime, but were accessible in Flash Builder.
It turned out that by default the .ANE file wasn't copied to the device.
To fix this, change the following project property:
ActionScript Build Packaging -> Apple iOS -> Native Extensions -> Check 'Package' for the ANE
No idea why it wasn't included by default. When you uncheck 'Package' you get a warning telling you that it may cause runtime issues!
In my case, we had a nested reference to the same library which needed to load before the other library also using it. This fix can be accomplished by unchecking the 'Automatically determine library ordering based on dependencies' and moving the library up in the chain of Build path libraries. Flash Builder was unable to determine the correct order base on dependencies because we had 2 different versions of the same library. The error would only happen during run time.
I had this problem after installing AIR 3.9 and trying to upgrade a project.
It was also saying there was an RSL error, before throwing a succession of #1014 errors.
It worked after I set the textLayout.swc link type in Advanced ActionScript Settings to 'merged into code' instead of the default (RSL)
Hope this helps!
Since I landed on this page searching for this error message and none of the above solutions worked for me, here's how I finally managed to work around it:
It seems that this error happens particularly when you include old libraries that were compiled with the old compiler but compile your app with the new one. Unfortunately the error sometimes fires and when you compile again it doesn't; at other times it works fine in the debug version but then it fails in the release.
What worked for me is to include dummy objects in your main app which are instances of the class that the verify error complains about:
import some.classpath.to.TheClassThatFailsOnVerify;
function YourMainApp(){
var dummy:TheClassThatFailsOnVerify = new TheClassThatFailsOnVerify ();
}
At least in my case the errors only fired for classes that were not used directly in the app but only internally in the swc library code, so by having the dummy objects in the main app I force Flash Builder to include those classes in the compilation.
In some cases you might have to first find the swc that contains the class in question since it's not part of the library swc you use but it's again a library that that swc uses itself.

1046 type not found on [spark.skins]::IHighlightBitmapCaptureClient

I've made an ActionScript Mobile project in Flash Builder 4.5 and am getting this error that I can't fix.
1046: Type was not found or was not a compile-time constant [spark.skins]::IHighlightBitmapCaptureClient.
The error does not link to any source.
The project is basically the source to Flixel's FlxCollisions demo, but trying to compile it for iOS.
Using the same src folder (flxCollisions and Flixel 2.5) in a plain Actionscript project does not cause this error and runs as expected.
I've tried creating an empty AS Mobile project with a trace('hello'): that worked fine. Nothing in the project is using spark.skins.
How can I get rid of this error? What should I be looking at, or for?
I have the same issue and my main class embeds a preloader like so:
[Frame(factoryClass="Preloader")]
public class Main extends Sprite
Commenting that line out makes the error go away.
However, this wasn't what I wanted, so I went off and added the following SWC folders as dependencies:
/Applications/Adobe Flash Builder 4.5/sdks/4.5.0/frameworks/libs
/Applications/Adobe Flash Builder 4.5/sdks/4.5.0/frameworks/locale
Which fixed all the errors. But I will still need to carefully go through the build path and yank out all the unwanted code.