我正在使用Flash Builder 4.6,並試圖建立和Ant任務來構建並運行我的Flash應用程序。我可以讓Ant任務構建和運行我的應用程序,但它不會跟蹤到控制檯,斷點也不起作用。在Flash Builder中爲ant任務啓用控制檯輸出
我跟着的this Stack Overflow post的建議,但我不斷收到錯誤:
[exec] Another Flash debugger is probably running; please close it. Details: 'Unrecognized Windows Sockets error: 0: JVM_Bind'.
我也跟着this post's advice正確配置我在Flash Builder Ant腳本,但似乎不有所作爲。
我的AS文件:
package
{
import flash.display.Sprite;
import flash.text.TextField;
public class HelloAnt extends Sprite
{
public function HelloAnt()
{
var label : TextField = new TextField();
label.text = "Hello World!";
addChild(label);
trace ("Hello World!");
}
}
}
我的Ant腳本:
<?xml version="1.0" encoding="utf-8"?>
<project name="HelloAnt" basedir=".">
<property name="FLEX_HOME" value="C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6\sdks\4.6.0"/>
<property name="src" value="${basedir}\src"/>
<property name="bin" value="${basedir}\bin"/>
<property name="application" value="${bin}\swf\HelloAnt.swf" />
<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />
<target name="run">
<echo file="${basedir}/build/.fdbinit">
run ${application}
</echo>
<exec executable="${FLEX_HOME}/bin/fdb.exe" spawn="false" dir="build">
<arg line="-unit"/>
</exec>
</target>
<target name="build">
<mxmlc output="${application}"
file="${src}/HelloAnt.as"
actionscript-file-encoding="UTF-8"
keep-generated-actionscript="false"
optimize="true"
fork="true"
debug="true"
maxmemory="1024m"
static-link-runtime-shared-libraries="true">
<source-path path-element="${FLEX_HOME}/frameworks" />
<source-path path-element="${src}" />
</mxmlc>
</target>
<target name="build-run">
<sequential>
<antcall target="build" />
<antcall target="run" />
</sequential>
</target>
</project>
我的想法。有人有任何見解嗎?