Antでビルドしたら"Embed"を解釈してくれない件
通常Flex Builderで作業していて、リリースビルドのためにAntでビルドしようとAdobeのユーザーガイドに書かれているとおりにbuild.xmlを作ってビルドすると
トランスコーディングのために解決できません
とか言われる。回避策に Embed(source="/assets/img/...") て書く、とかあったけどそれだとデザインビューで画像見えないしなんか本末転倒。
どうしたら良いかと言えば
<mxmlc file="${SRC_DIR}/${AIR_NAME}.mxml" output="${OUTPUT_DIR}\${ENV}\${AIR_NAME}.swf" actionscript-file-encoding="UTF-8" locale="ja_JP" keep-generated-actionscript="false" incremental="true" configname="air" services="${OUTPUT_DIR}\${ENV}\config\services-config.xml" > <load-config filename="${FLEX_HOME}/frameworks/air-config.xml"/> <source-path path-element="${FLEX_HOME}/frameworks" /> <source-path path-element="${SRC_DIR}" /> <source-path path-element="${OUTPUT_DIR}/${ENV}/locale/ja_JP" /> <compiler.library-path dir="${FLEX_HOME}/frameworks" append="true"> <include name="libs" /> </compiler.library-path> <compiler.library-path dir="../libs" append="true"> <include name="*.swc" /> </compiler.library-path> <default-size width="500" height="600" /> </mxmlc>
source-path path-element="${SRC_DIR}" が必要、ってこと。