flashdevelop halted with no explicit compile error
We are developing flash based games using flashdevelop and flash CS 3. We are using flash CS3 to publish the swc and the swc wil开发者_开发知识库l be used in flashdevlop as library.
Everything seems well, until one day I made a change to the fla(the change is canceling the embed fonts or move a movieclip from one point to another, nothing unusual) and then publish as swc. But when i try to recompile with the latest swc, it fails with the following errors:
Error: null
Build halted with errors (fcsh).
(fcsh)
Done(1)
Error is null and no other explicit compiling errors.
When I try to use the old fla to publish the swc, the swc sometimes works well with flashdevelop but sometimes it fails with the above reason. I have no idea about this.
Can anyone help me about this?
Big thinks to you guys who can offer me some hints, since it annoys me so greatly.
After one morning of:
- reinstalling all the flex environment including flex-sdk, flashDevelop , etc.
- reverting classes and comparing them one by one
We found the problem :) In our case it was a strange overloading problem which comes from this piece of code :
private function onButtonClicked(e:Event):void
{
e:Event = new Event(Event.CHANGE);
dispatchEvent(e);
}
Apparently the parser can't detect the overloading of an existing variable if you forget to put the 'var' keyword (third example) :
// [Error: A conflict exists with definition e in namespace internal.]
var e:Event = new Event(Event.CHANGE);
// OK
e = new Event(Event.CHANGE);
// [Error: Classes must not be nested. public class Main extends Sprite]
// or
// [Error: null Build halted with errors (fcsh).]
e:Event = new Event(Event.CHANGE);
I have just crossed by this issue and I found out a way to fix it:
If you're exporting your SWC
through flash, the problem may be in the way the SWC is being compiled.
Go to Publish Settings, under the Flash Tab, click on the Settings button, and a new dialog will appear. Down there on the Runtime Shared Library Settings, select the Default linkage as Merged into code and compile the swc.
The Runtime Shared Library
, when you add some specific classes, objects or components, will create a preloader and when this happens, the Flashdevelop
can't read the contents, then he will not compile your project and return a null error. Which is pretty clueless.
You'll notice that RSL swc
is smaller than a merged code swc... in my case, about 70% bigger.
--
One thing that I noticed. If you're using the TLF Textfield
, it'll automatically create the preloader and use an external SWF for the text field data. You can change all TLF textfield to the classic textfield and use the RSL swc.
I was getting this error and I solved it for me. I installed FlashDevelop today and got those errors by just changing the value of a string from "Hello Planet" to "Hello World" or anything else.
I found two ways to solve this:
1 Short-term Solution: Press Project > Project Test (which fails) then Press Project > Project Run. It now works but if you make 1 change it fails again and you have to repeat the process.
2 Long-term Solution (which saves time in the long run): This one sounds strange but it works for some reason. You will never get that error for no reason again.
- Download Flex SDK and AIR SDK from Adobe Labs.
- Unzip them and copy and paste all of the AIRSDK FILES into the FLEXSDK folder. Sounds crazy but is vital.
- Place your FlexAIR merged folder somewhere on your hard-drive where it will stay for a long time.
- Point FlashDevelop to the new FlexAIR merged folder.*
Create new project and it works!
- How to point the FlashDevelop to the new FlexAIR merged folder? In this link follow the instructions under the heading "Point FlashDevelop to the Flex SDK" http://www.untoldentertainment.com/blog/2011/12/07/flash-to-ios-a-step-by-step-tutorial-part-3-2/
This is a bug of the Flex compiler - just re-build and it will work.
A workaround has been found and it won't appear in future releases of FlashDevelop.
the solution is to use Java 7 (v1.7.0), more informations on this forum : http://www.flashdevelop.org/community/viewtopic.php?f=6&t=12900
精彩评论